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

Taught in

References