Color Contrast Checker

WCAG 2.1 contrast ratio for a foreground and background pair, with the exact AA and AAA verdict for normal and large text.

Design & colourWcagContrastAccessibility
Color Contrast Checker screenshot

The WCAG 2.1 contrast ratio for any two hex colours, with a separate verdict at every threshold that matters: AA and AAA for normal body text at 4.5 and 7, AA and AAA for large text at 3 and 4.5, and 3 for UI components and graphical objects such as icons, borders and focus rings. Each colour's relative luminance is shown alongside, computed with the piecewise sRGB linearisation the standard actually specifies rather than a gamma approximation. White on black reads exactly 21:1, and the page shows you the sample text rendered in the pair you picked.

WCAG 2.1 RELATIVE LUMINANCE AA AND AAA

Six-digit and three-digit hex both work, with or without the leading hash. Each channel is linearised with the WCAG 2.1 piecewise curve before the weighted sum, and the ratio is (L1 + 0.05) / (L2 + 0.05) with the lighter colour on top — so white on black is exactly 21, not 20.9-something.

The quick brown fox jumps over the lazy dog.
Ratio
Luminance
WCAG 2.1 conformance

More tools