Skip to content

Commit

Permalink
docs(theming): mention black as last resort contrast color
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Apr 17, 2020
1 parent 216f64b commit 2f40940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/content/docs/4.3/getting-started/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ In practice, you'd call the function and pass in two parameters: the name of the

#### Color contrast

An additional function we include in Bootstrap is the color contrast function, `color-contrast`. It utilizes the [WCAG 2.0 algorithm](https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests) for calculating contrast thresholds based on [relative luminance](https://www.w3.org/WAI/GL/wiki/Relative_luminance) in a `sRGB` colorspace to automatically return a light (`#fff`) or dark (`#111`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes.
An additional function we include in Bootstrap is the color contrast function, `color-contrast`. It utilizes the [WCAG 2.0 algorithm](https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests) for calculating contrast thresholds based on [relative luminance](https://www.w3.org/WAI/GL/wiki/Relative_luminance) in a `sRGB` colorspace to automatically return a light (`#fff`), dark (`#111`) or black (`#000`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes.

For example, to generate color swatches from our `$theme-colors` map:

Expand Down

0 comments on commit 2f40940

Please sign in to comment.