Color Accessibility Checker
Check any two colours against WCAG AA and AAA. Live preview, plain-English verdicts, and suggested fixes when a pairing falls short.
The quick brown fox jumps over the lazy dog. This is normal body text at 16px.
Large heading text at 24px bold
Button or UI elementBest for: Confirming body text clears the WCAG AA 4.5:1 ratio before launch, and checking whether large headings pass at 3:1 or reach AAA at 7:1
Limitations: Checks contrast ratios between two colours you supply and does not simulate colour blindness or scan a live page for every text and background pair
Best suited for: Web developers running an accessibility pass before a site goes to a client
What WCAG Asks For
What is WCAG?
WCAG is the W3C's Web Content Accessibility Guidelines. The current version, WCAG 2.2, became a W3C Recommendation on 12 December 2024. Three success criteria cover contrast, and they are the ones this tool checks:
1.4.3 Contrast (Minimum), Level AA. Text needs at least 4.5:1, or 3:1 if it is large, which W3C defines as "at least 18 point or 14 point bold."
1.4.6 Contrast (Enhanced), Level AAA. 7:1 for normal text and 4.5:1 for large text.
1.4.11 Non-text Contrast, Level AA. User interface components and meaningful graphics need 3:1 against adjacent colours. There is no AAA version, so in UI mode AAA is marked not applicable rather than failed.
W3C does not recommend requiring Level AAA as a general policy for whole sites, because some content cannot meet every AAA criterion.
Relative Luminance Decides Contrast, Not Lightness
The checker computes each colour's relative luminance as WCAG 2.2 defines it. Each channel is divided by 255 and linearised: at or below 0.04045 it is divided by 12.92, otherwise it becomes ((v + 0.055) / 1.055)2.4. Then L = 0.2126 R + 0.7152 G + 0.0722 B, and the ratio is (L1 + 0.05) / (L2 + 0.05), with L1 the lighter colour, so it runs from 1:1 to 21:1.
HSL lightness plays no part. All five colours below have HSL lightness 50%, yet their relative luminance runs from 0.9278 to 0.0722, which is why yellow on white scores 1.07:1 and blue on white 8.59:1.
| Colour | HSL lightness | Relative luminance | On white | On black |
|---|---|---|---|---|
| #FFFF00 | 50% | 0.9278 | 1.07:1 | 19.56:1 |
| #00FFFF | 50% | 0.7874 | 1.25:1 | 16.75:1 |
| #00FF00 | 50% | 0.7152 | 1.37:1 | 15.3:1 |
| #FF0000 | 50% | 0.2126 | 4:1 | 5.25:1 |
| #0000FF | 50% | 0.0722 | 8.59:1 | 2.44:1 |
The ratio is displayed to two decimals, but pass or fail uses the unrounded number. #0071F4 on white displays as 4.50 and fails AA for normal text, because its ratio is 4.4983:1. Computed with the site's code over every third 24-bit colour, 3,081 colours show 4.5 or more against white while falling below it (method).
Five Colour Combinations That Fail, and How to Fix Them
Every ratio below is computed with the same formula as the checker above.
Three are a light colour on white, fixed by darkening the text. The other two are white labels on a bright button, fixed by darkening the button.
Where This Tool Stops
It compares two flat colours. It cannot judge text on a photograph, gradient or video, where the background changes pixel by pixel, and it does not show how a pair looks with a colour vision deficiency; the colour blindness simulator does. WebAIM's guide to contrast and colour covers the thresholds in more depth.