Skip to content

Commit

Permalink
Merge pull request #1 from daverobertson/master
Browse files Browse the repository at this point in the history
resolves slash as division deprecation warning
  • Loading branch information
timhettler committed Jan 24, 2023
2 parents 81e4215 + c82967b commit 162a3cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sass/partials/_yiq.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

/// Determines whether a given color is light or dark.
/// The YIQ color space function gives weights each RGB value according to how sensitive they are to human eyesight.
/// @param {Color} $color - The color to test
Expand All @@ -11,7 +13,7 @@
$green: green($color);
$blue: blue($color);

$yiq: (($red*299)+($green*587)+($blue*114))/1000;
$yiq: math.div(($red*299)+($green*587)+($blue*114), 1000);

@if $yiq-debug { @debug $yiq, $threshold; }

Expand Down

0 comments on commit 162a3cf

Please sign in to comment.