Color Contrast Checker

Pick a text color and a background color. The contrast ratio and WCAG pass/fail results update as you go.

How it works

The contrast ratio is computed from the WCAG 2.x relative luminance formula for each color, then (lighter + 0.05) / (darker + 0.05) — it ranges from 1 (identical colors) to 21 (pure black on pure white). AA requires at least 4.5:1 for normal text or 3:1 for large text; AAA requires 7:1 or 4.5:1.

"Large text" means 18pt (24px) and up, or 14pt (~18.5px) and up when bold — the WCAG definition used above to pick the right threshold.