diff options
| author | Andres Galante <[email protected]> | 2017-12-02 00:26:10 -0300 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-12-01 19:26:10 -0800 |
| commit | 1d6e3710dd447de1a200f29e8fa521f8a0908f70 (patch) | |
| tree | e2acaa7c0077705ad6d23b49191fadf6428e57dd | |
| parent | 023015006af17f1ac527cb1d0eaf5ac401a45f09 (diff) | |
| download | bootstrap-1d6e3710dd447de1a200f29e8fa521f8a0908f70.tar.xz bootstrap-1d6e3710dd447de1a200f29e8fa521f8a0908f70.zip | |
Adds variable for color yiq threshold (#24886)
| -rw-r--r-- | scss/_functions.scss | 2 | ||||
| -rw-r--r-- | scss/_variables.scss | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss index 5580dfa9a..1266d34bd 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -56,7 +56,7 @@ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - @if ($yiq >= 150) { + @if ($yiq >= $yiq-contrasted-threshold) { @return $yiq-text-dark; } @else { @return $yiq-text-light; diff --git a/scss/_variables.scss b/scss/_variables.scss index 788c55a49..be3dd69b5 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -87,11 +87,13 @@ $theme-colors: map-merge(( // Set a specific jump point for requesting color jumps $theme-color-interval: 8% !default; +// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255. +$yiq-contrasted-threshold: 150 !default; + // Customize the light and dark text colors for use in our YIQ color contrast function. $yiq-text-dark: $gray-900 !default; $yiq-text-light: $white !default; - // Options // // Quickly modify global styling by enabling or disabling optional features. |
