Color Contrast Checker (WCAG Luminance)

Enter a foreground and background color to compute today's WCAG relative luminance and contrast ratio (AA/AAA) below. The right-hand swatches under the preview show what the modern WCAG formula 'sees' for each color; the left-hand swatches show what a 1953 NTSC broadcast engineer's luma formula would have shown for the exact same colors — a direct side-by-side of old versus new.

Loading interactive simulation...

Why green outweighs red and blue — and why the law still uses 1953's math 🖖

The weights in the luminance formula (0.2126 green-heavy today, 0.299/0.587/0.114 in 1953) aren't arbitrary: they trace to the CIE 1931 standard observer, which found the human eye's cone response and luminous-efficiency curve make us far more sensitive to green light than red or blue. NTSC needed exactly this kind of weighted sum in 1953 so a new color broadcast still produced a correct grayscale picture on the millions of black-and-white sets already in living rooms — 'luma' was invented as a backward-compatibility hack, not a perceptual ideal. That history matters today because the WCAG 2 contrast ratio checked above is legally load-bearing (cited by the ADA and EN 301549), yet vision scientists consider it flawed: it's known to overrate dark-text-on-light contrast and underrate light-text-on-dark — directly relevant since this very site defaults to a dark theme. WCAG 3's draft replacement, APCA, models that asymmetry properly; until it ships, the formula above remains the one you're actually required to satisfy.

What a contrast ratio actually measures 🖖

The number this tool reports is a ratio of relative luminance: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 the darker. It runs from 1:1 (identical, invisible colors) to 21:1 (pure black on pure white). That 0.05 added to both isn't rounding — it models the faint ambient glare real screens reflect from the room, so even 'pure black' is never truly zero. Aim for 4.5:1 on body text and 3:1 on large text to clear the WCAG AA bar.

A typo frozen into the law 🖖

The formula linearizes each sRGB channel with a piecewise curve that switches from a linear toe to a gamma exponent at a threshold. WCAG 2 puts that switch at 0.03928 — but the actual sRGB standard sets it at 0.04045. The WCAG value is a typo, copied from an early sRGB draft before the number was corrected, and it has been frozen into an internationally cited accessibility law ever since. The error shifts results by less than 10⁻⁴, so no one has bothered to fix the wording.

Example problems