Color Contrast Checker
A Color Contrast Checker measures the WCAG contrast ratio between a text (foreground) color and a background color — from 1:1 to 21:1 — and reports whether the pair passes WCAG 2.x AA and AAA for normal text, large text, and UI components, computed entirely in your browser.
The quick brown fox jumps over the lazy dog. Normal body text at 16px.
Large heading text · 24px bold
Small print and captions render here too.
Contrast ratio
14.76:1
- Normal textAAPass
- Normal textAAAPass
- Large textAAPass
- Large textAAAPass
- UI & graphicsAAPass
About Color Contrast Checker
Enter any foreground and background color as HEX, RGB, HSL, or OKLCH (or use the pickers) and the checker computes the exact contrast ratio using the official WCAG relative-luminance formula, then grades it against every threshold: 4.5:1 for normal text (AA), 7:1 (AAA), and 3:1 for large text and non-text UI. Translucent colors are alpha-composited over the background first so the ratio reflects what users actually see. A live preview shows real text at body and heading sizes on your chosen background. Nothing is uploaded — the math runs locally.
What Color Contrast Checker does
- Exact WCAG 2.x contrast ratio (1:1 to 21:1)
- AA/AAA pass-fail for normal text, large text, and UI/graphics
- Accepts HEX, RGB, HSL, and OKLCH, plus native color pickers
- Alpha-aware — composites translucent colors before measuring
- Live preview of real text at body and heading sizes
- Runs entirely in your browser — nothing uploaded
When to reach for Color Contrast Checker
- Confirming body text meets the 4.5:1 AA minimum before shipping
- Checking whether a brand color is legible on white or dark backgrounds
- Auditing button and badge colors against the 3:1 UI-component rule
- Finding an accessible foreground for a fixed brand background
How to use Color Contrast Checker
- 01
Enter two colors
Type or pick a foreground (text) color and a background color.
- 02
Read the ratio
The contrast ratio updates live, from 1:1 (identical) to 21:1 (black on white).
- 03
Check the grades
See AA/AAA pass or fail for normal text, large text, and UI components, and adjust until it passes.
When to use Color Contrast Checker vs alternatives
| Alternative | Use Color Contrast Checker when… | Use the alternative when… |
|---|---|---|
| Browser DevTools contrast hint | you want to test arbitrary color pairs with no element on the page, and see AAA and large-text grades too. | you're inspecting a specific rendered element in place. |
| WebAIM Contrast Checker | you'd rather not send colors to a third-party page and want OKLCH input support. | you want their specific link-contrast extras. |