Skip to content

Commit 3075432

Browse files
wtorsiXhmikosR
authored andcommitted
feature/yiq function, add parameters, with default values. (#26917)
1 parent e2014e8 commit 3075432

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scss/_functions.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@
4949
}
5050

5151
// Color contrast
52-
@function color-yiq($color) {
52+
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
5353
$r: red($color);
5454
$g: green($color);
5555
$b: blue($color);
5656

5757
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
5858

5959
@if ($yiq >= $yiq-contrasted-threshold) {
60-
@return $yiq-text-dark;
60+
@return $dark;
6161
} @else {
62-
@return $yiq-text-light;
62+
@return $light;
6363
}
6464
}
6565

0 commit comments

Comments
 (0)