Color Contrast Checker (WCAG)
Test foreground and background color pairs against WCAG AA and AAA accessibility standards — instant contrast ratio and pass/fail results
| Level | Type | Minimum | Result |
|---|---|---|---|
| AA | Normal text | 4.5:1 | PASS |
| AA | Large text | 3:1 | PASS |
| AAA | Normal text | 7:1 | PASS |
| AAA | Large text | 4.5:1 | PASS |
Drop in two hex colors and instantly see whether your text-background pair meets WCAG AA or AAA contrast thresholds. The tool shows the exact ratio, flags pass or fail for normal and large text, and suggests alternative foreground colors when your combo falls short.
And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool converts each hex color to its relative luminance (a measure of perceived brightness, weighted toward how human eyes respond to red, green, and blue). It divides the lighter luminance by the darker one to get a ratio between 1:1 and 21:1. WCAG 2.1 says normal text needs at least 4.5:1 for AA, and 7:1 for AAA. Large text gets a break — 3:1 for AA.
Examples
Dark Gray Text on White — The Safe Default
You're building a blog and want body text that feels softer than pure black but still passes every WCAG level.
Foreground: #333333
Background: #FFFFFF
Ratio: 12.63:1
AA Normal: PASS
AAA Normal: PASS
Brand Orange on White — Trickier Than It Looks
Marketing wants orange buttons with white text. Looks bold, right? The contrast ratio tells a different story.
Foreground: #FFFFFF
Background: #FF8C00
Ratio: 2.95:1
AA Normal: FAIL
AA Large: FAIL (barely)
Suggested fix: #9A5500
Navy on Light Blue — Subtle Background Combos
Info banners often pair navy text with a pale blue box. Quick check confirms it works.
Foreground: #1E3A5F
Background: #DBEAFE
Ratio: 8.41:1
AA Normal: PASS
AAA Normal: PASS
Who Uses This
Validate text and button colors against WCAG before pushing to production.
Test color palette combos in Figma, then confirm ratios here before handoff.
Spot-check live pages for WCAG 2.1 AA and AAA compliance during audits.
Verify brand colors actually work for body text before approving a style guide.
Common Mistakes
Your Retina screen makes everything look crisp. A $200 office monitor washes colors out badly. If the ratio is right at 4.5:1, bump it up a notch to account for cheaper screens.
Large text (18px+ bold, or 24px+ regular) only needs 3:1. Normal text needs 4.5:1. People see "PASS" for large text and assume the whole page is fine — then small captions and footnotes fail.
RGBA or HSLA colors with opacity depend on whatever sits behind them. The actual rendered color changes with the background. Convert to a flat hex value first (use a color picker on a screenshot), then check that.
Technical Details
- Processing: 100% client-side
- Browser Support: Chrome, Firefox, Safari, Edge
- Standard: WCAG 2.1 contrast ratio formula (relative luminance)
- Color Input: 3-digit and 6-digit hex codes with or without #
- Ratio Range: 1:1 (identical) to 21:1 (black on white)
Frequently Asked Questions
What is a good contrast ratio for text?
For normal-sized body text, aim for at least 4.5:1 — that's the WCAG AA minimum. If you want AAA (the highest level), you need 7:1. Large text like headings can get by with 3:1 for AA. Most readable websites land somewhere between 7:1 and 12:1 for body copy.
What's the difference between WCAG AA and AAA?
AA is the standard most laws and guidelines reference — it's what you need to meet for ADA and EU accessibility compliance. AAA is stricter and harder to hit with colorful brand palettes. Most teams target AA across the board and aim for AAA where they can.
Does color contrast matter for images and icons?
WCAG 2.1 added a requirement for non-text contrast (Success Criterion 1.4.11). UI components like icons, form borders, and focus indicators need at least 3:1 against their background. Decorative images are exempt, but anything functional is not.
Why does my color fail even though it looks fine to me?
Your eyes adapt to your specific screen brightness and surrounding light. Someone with color vision deficiency, an older display, or sunlight glare on their phone won't have that advantage. The math doesn't care about your monitor — it measures the gap between two color values objectively.
Can I check contrast for colors that aren't hex?
This tool takes hex codes. If you have RGB values like rgb(100, 50, 200), convert each number to hex first — or just use the color picker built into the tool and click the exact shade you want. HSL and named CSS colors work the same way: convert to hex, then paste.