Contrast
object Contrast
Color science for contrast utilities.
Utility methods for calculating contrast given two colors, or calculating a color given one color and a contrast ratio.
Contrast ratio is calculated using XYZ's Y. When linearized to match human perception, Y becomes HCT's tone and Lab*'s' L*.
Functions
Link copied to clipboard
Tone <= tone parameter that ensures ratio. 0 if ratio cannot be achieved.
Link copied to clipboard
Tone >= tone parameter that ensures ratio. 100 if ratio cannot be achieved.
Link copied to clipboard
Contrast ratio of two tones. T in HCT, L* in Lab*. Also known as luminance or perpetual luminance.