Closed guylepage3 closed 5 years ago
Need to test out something like...
// Color contrast
@function color-yiq($color) {
$r: red($color);
$g: green($color);
$b: blue($color);
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) {
@return $yiq-text-dark;
} @else {
@return $yiq-text-light;
}
}
Done. Included in 1.5
Description Add Sass function that auto detects background color and outputs the correct "light" or "dark" color theme based upon color accessibility standards.
Tweet - https://twitter.com/guylepage3/status/1075021874990604290
Tasks