Color Contrast Checker (WCAG)
Check color contrast ratios against WCAG 2.x AA and AAA for normal text, large text and UI components, with a live preview. Everything runs locally in your browser; nothing is uploaded.
Enter a text and a background color in hex. The contrast ratio is shown with pass or fail results for each WCAG level.
Colors
Large sample text
The quick brown fox jumps over the lazy dog.
WCAG result
14.68:1
- Normal text — AA (needs 4.5:1)Pass
- Normal text — AAA (needs 7:1)Pass
- Large text — AA (needs 3:1)Pass
- Large text — AAA (needs 4.5:1)Pass
- UI components & graphics — AA (needs 3:1)Pass
Learn more
Why contrast matters
Low contrast text is hard to read for people with low vision, in sunlight and on cheap screens. WCAG sets minimum ratios so text stays legible.
Limits of the formula
The WCAG 2 ratio ignores font weight and polarity, so a pass is not a guarantee. Check dark-mode palettes and thin fonts by eye too.
Frequently asked questions
What ratios are required?
AA needs 4.5:1 for normal text and 3:1 for large text and UI components. AAA needs 7:1 and 4.5:1.
What counts as large text?
At least 24 px, or 18.66 px when bold.
How is the ratio calculated?
(L1 + 0.05) / (L2 + 0.05), using the relative luminance of the lighter and darker colors.