feature/yiq function, add parameters, with default values. (#26917)

This commit is contained in:
Andrey 2018-10-21 10:33:53 +03:00 committed by XhmikosR
parent e2014e8ed7
commit 3075432584
1 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@
}
// Color contrast
@function color-yiq($color) {
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color);
$g: green($color);
$b: blue($color);
@ -57,9 +57,9 @@
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) {
@return $yiq-text-dark;
@return $dark;
} @else {
@return $yiq-text-light;
@return $light;
}
}