relative luminance
How bright a colour is on a scale from 0 (black) to 1 (white), computed from its sRGB red, green and blue values.
In more detail
The channels are first converted from their stored values to linear light, then weighted because the eye is most sensitive to green: 0.2126 red, 0.7152 green, 0.0722 blue. WCAG's contrast ratio is built on this number. The lesson code approximates the conversion with a 2.2 power curve; the official formula uses a slightly different piecewise curve.
Related terms
- contrast ratio — A number from 1:1 to 21:1 comparing the relative luminance of text and its background, used by WCAG to judge readability.
- sRGB — The standard RGB colour space that most screens, images and older CSS colours use.
Taught in
- Modern Color Spaces: OKLCH, Gamut Mapping & APCA Contrast — Design Systems & Component Engineering
- Visual Contrast Auditing: Color Blindness & Reduced Motion — Design Systems & Component Engineering