Color Contrast Checker — WCAG AA / AAA Ratios
Large text 24px
Normal text 16px — the quick brown fox jumps over the lazy dog.
Links and underlined text
Computed locally with the WCAG 2.1 relative-luminance formula.
About the Color Contrast Checker
Color Contrast Checker computes the WCAG contrast ratio between a text color and its background as you adjust either side. Big live preview, the ratio to two decimals, and pass/fail badges for every threshold: AA (4.5:1) and AAA (7:1) for normal text, relaxed 3:1 rules for large text, and the 3:1 UI-component minimum for icons and borders.
Pick colors with the native pickers, type hex codes, or start from presets that mirror real-world failures — gray body text on white, brand-colored buttons. Swapping foreground and background is one click. All math runs locally with the WCAG 2.1 relative-luminance formula.
How to use the Color Contrast Checker
- Choose a text color and a background color (picker or hex).
- Read the live ratio and the AA/AAA badges.
- Adjust until the rows you need show ✓ — the preview always shows the real rendering.
How WCAG contrast is computed
Relative luminance (WCAG 2.1): L = 0.2126·R + 0.7152·G + 0.0722·B where each channel c ∈ [0,1] is linearized: c ≤ 0.04045 → c/12.92 otherwise ((c+0.055)/1.055)^2.4 Contrast ratio = (L_lighter + 0.05) / (L_darker + 0.05) Thresholds (WCAG 2.1): AA normal text 4.5:1 · AA large text 3:1 AAA normal text 7:1 · AAA large text 4.5:1 UI components & meaningful graphics 3:1 Large text = ≥18pt (24px), or ≥14pt (18.66px) bold.
Frequently asked questions
What ratio do I need to pass WCAG AA?
4.5:1 for normal text and 3:1 for large text (24px+, or 18.66px+ bold). AAA raises the bar to 7:1 and 4.5:1. Non-text elements like input borders and icons need 3:1.
Does the ratio depend on font size?
The ratio itself is purely color math; font size only decides which threshold applies — that is why large text gets a relaxed limit.
Why does gray #6b7280 on white fail AA?
It measures ≈4.6:1 on pure white… borderline in practice: it passes on #fff exactly, but on slightly tinted backgrounds it drops below 4.5:1. Test your actual background — that is what the tool is for.
Is this the same test as Lighthouse?
Yes — Lighthouse flags the same WCAG 2.1 contrast failures. This tool lets you explore fixes interactively before running an audit.
Related tools
HEX to RGB Color Converter
Enter a color in any format — #0d9488, rgb(13,148,136) or hsl(174,84%,32%) — and this tool converts it to the other two…
Image Color Picker
Image Color Picker answers “what color is that?” instantly: load a photo, screenshot, logo or mock-up, click anywhere on it,…
JSON Formatter
Paste JSON and this tool tells you instantly whether it is valid — and if not, exactly where it breaks, with the error position.
Regex Tester
Regex Tester gives you instant feedback while you build a pattern: every match is highlighted in your test text as you type,…
QR Code Generator
Type or paste any text or URL and this tool renders a scannable QR code instantly, downloadable as a crisp PNG.