Colour Contrast Checker — WCAG AA and AAA Ratios for Text and UI
Calculate W3C relative luminance contrast ratios for accessible UI typography.
Accepts #hex, rgb(), hsl(), CSS colour names and transparency (translucent colours are blended onto the background as browsers do).
Large text Aa
Normal text for paragraphs and buttons.
5.23:1
- ✓ Normal text, AA (4.5:1)
- ✓ Large text, AA (3:1)
- ✗ Normal text, AAA (7:1)
- ✓ Large text, AAA (4.5:1)
- ✓ UI components and graphics (3:1)
When to use the WCAG AA/AAA Color Contrast Ratio Checker
The real WCAG formula
The ratio comes from sRGB relative luminance per WCAG 2.2 and is compared unrounded, so 4.49:1 still fails normal text at level AA.
Five thresholds at once
Normal and large text at levels AA and AAA, plus interface components and graphics at 3:1, are checked together with a live text preview.
The nearest passing colour
When contrast falls short, the tool finds a text colour with the same hue and saturation and the smallest change in lightness, keeping the brand look.
Any colour format
Hex codes, rgb(), hsl(), CSS colour names and translucent colours are accepted; translucent colours are blended onto the background as browsers do before the ratio is computed.
Frequently asked questions
What counts as large text?
Under WCAG, large text is at least 18 pt (about 24 px) or 14 pt bold (about 18.7 px). Large text only needs 3:1 at level AA.
Which level should I meet?
AA is the common standard in accessibility laws and public procurement in many countries. AAA is stricter and advised for long text or users with low vision.
Do placeholders and disabled buttons count?
Disabled controls are exempt under WCAG, but placeholder text people need to read should still meet 4.5:1 so it is not missed.
What about dark mode?
Check each colour pair in both themes. An accent that passes on white often fails on a dark background and usually needs a lighter version.
Similar tools
- DKIM Key Pair & _domainkey TXT Record GeneratorGenerate RSA/TXT selector._domainkey DNS record formatting cleanly.
- DMARC (_dmarc) Policy & Reporting TXT GeneratorConfigure v=DMARC1 p=none/quarantine/reject, pct & rua reporting records.
- SPF (v=spf1) Record & 10-Lookup Limit BuilderAssemble v=spf1 IPv4/IPv6/include mechanisms while checking RFC 10-lookup cap.
- RFC 8461 MTA-STS & TLS-RPT Record GeneratorGenerate /.well-known/mta-sts.txt and _mta-sts DNS TXT records together.