Colour Contrast Checker
Check a text and background colour against WCAG AA and AAA contrast ratios.
Colours
Large text sample (24px bold)
Normal body text sample at 16px — the quick brown fox jumps over the lazy dog.
| Level | Normal text | Large text |
|---|---|---|
| WCAG AA (4.5 / 3) | ||
| WCAG AAA (7 / 4.5) | ||
| UI components (3) | ||
What the ratio means
Contrast ratio runs from 1:1 (identical) to 21:1 (black on white). WCAG sets minimums so text stays readable for people with low vision. The threshold depends on text size — large text is 18.66px bold or 24px regular and up.
- AA —
4.5:1for normal text,3:1for large text. The common legal/compliance baseline. - AAA —
7:1normal,4.5:1large. Enhanced; aim for it on body copy where you can. - UI components & graphics —
3:1for borders, icons, form outlines and focus indicators (WCAG 1.4.11).
How it's calculated
Each colour's relative luminance is computed by linearising its sRGB channels and weighting them for human vision, then the ratio is (L_lighter + 0.05) / (L_darker + 0.05). It's independent of which colour is text and which is background, so swapping them gives the same ratio — the preview shows both arrangements of your two colours.
These calculators run entirely in your browser — nothing you type is sent anywhere. Results are estimates for planning; validate against your vendor's documentation before you buy or deploy.