Color · 0–1

Relative luminance

The WCAG brightness measure behind contrast ratios.

Key facts

Range0–1
WeightsR 0.2126 · G 0.7152 · B 0.0722
Linearizationc ≤ 0.03928 ? c/12.92 : ((c+0.055)/1.055)^2.4
Black0
White1
Used byWCAG contrast ratio

Why channels are linearized first

sRGB values are gamma-encoded for display, not proportional to light. Luminance math must undo that encoding before weighting the channels. Skipping the step produces ratios that look plausible but do not match the standard.

Green dominates

The green weight of 0.7152 reflects human sensitivity. Two colors with similar RGB averages can have very different luminance: pure green is far brighter than pure blue. That is why contrast checks cannot be approximated by averaging channels.

Frequently asked questions

Does the formula work for wide-gamut colors?

No. WCAG's formula is defined for sRGB. Wide-gamut values must be converted to sRGB first, with the caveat that out-of-gamut colors cannot be represented exactly.

Is luminance the same as brightness?

It is a specific photometric quantity, not the perceived brightness of an arbitrary scene. The WCAG version is a simplified sRGB calculation.

Why 0.03928?

It is the sRGB linearization threshold from the specification, matching the piecewise transfer function.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.