-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Closed
Description
Hi,
The function is very great (thanks), but it will be much more convenient if we add some arguments, like below.
What do you think?
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color);
$g: green($color);
$b: blue($color);
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) {
@return $dark;
} @else {
@return $light;
}
}
Reactions are currently unavailable