You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
259 B

  1. @function color-yiq($color, $dark: #212529, $light: #fff) {
  2. $r: red($color);
  3. $g: green($color);
  4. $b: blue($color);
  5. $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
  6. @if ($yiq >= 150) {
  7. @return #343a40;
  8. } @else {
  9. @return #f8f9fa;
  10. }
  11. }