From: Mark Otto Date: Thu, 19 Oct 2017 04:06:13 +0000 (-0700) Subject: add vars for yiq color contrast function X-Git-Tag: v4.0.0-beta.3~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf2fee90356ba1be2ed739d9350b229c9e78064c;p=thirdparty%2Fbootstrap.git add vars for yiq color contrast function --- diff --git a/scss/_functions.scss b/scss/_functions.scss index 43210f7fb3..a95ad4375f 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -57,9 +57,9 @@ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; @if ($yiq >= 150) { - @return #111; + @return $yiq-text-dark; } @else { - @return #fff; + @return $yiq-text-light; } } diff --git a/scss/_variables.scss b/scss/_variables.scss index bfe3feaae1..993546fe7c 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -87,6 +87,10 @@ $theme-colors: map-merge(( // Set a specific jump point for requesting color jumps $theme-color-interval: 8% !default; +// Customize the light and dark text colors for use in our YIQ color contrast function. +$yiq-text-dark: #111 !default; +$yiq-text-light: #fff !default; + // Options //