Colour Contrast Checker
Test text contrast against WCAG AA and AAA.
How to use
- 1 Enter or pick your foreground (text) colour.
- 2 Enter or pick the background colour behind it.
- 3 Read the contrast ratio and the live text preview.
- 4 Check the AA and AAA pass/fail badges for normal and large text.
About Colour Contrast Checker
The Colour Contrast Checker measures the contrast ratio between a foreground (text) colour and a background colour, then tells you exactly which WCAG accessibility levels the pair passes.
Pick two colours and you get the ratio on the familiar 1:1 to 21:1 scale, plus a clear pass or fail for each of the four conformance targets: AA for normal text, AA for large text, AAA for normal text and AAA for large text.
The ratio is computed with the WCAG 2.x formula: each colour channel is linearised from sRGB, combined into a relative luminance using the standard 0.2126 / 0.7152 / 0.0722 weights, and the lighter and darker luminances are compared with the (L1 + 0.05) / (L2 + 0.05) ratio.
That means the numbers match what audit tools and screen-reader testers report, so you can trust them in a real accessibility review.
Black on white scores the maximum 21:1; identical colours score 1:1.
Sufficient contrast is one of the most common accessibility failures on the web, and it is also one of the easiest to fix once you can see the number.
Use this when choosing a palette, checking a button against its background, or verifying that placeholder and muted text are still legible.
A live sample renders your text colour on your background so you can judge it by eye as well as by ratio.
Everything runs locally in your browser — your colours are never uploaded.
FAQ
What is the difference between normal and large text?
WCAG treats text from about 18pt (or 14pt bold) as large, which only needs 3:1 for AA and 4.5:1 for AAA. Smaller text needs 4.5:1 for AA and 7:1 for AAA.
Does it account for transparency?
No. Contrast is defined for opaque colours, so any alpha in your hex value is ignored and only the RGB channels are used.