Color Contrast Checker
Test any text and background color combination against WCAG 2 accessibility guidelines. See the exact contrast ratio and clear pass/fail results instantly.
Large text preview (24px bold)
Normal body text preview. The quick brown fox jumps over the lazy dog.
Large text = at least 24px regular or 18.66px (14pt) bold.
How to Check Color Contrast
- Choose a text color and a background color using the swatches, or type HEX codes.
- Read the contrast ratio — it ranges from 1:1 (no contrast) to 21:1 (black on white).
- Check the AA and AAA results. Each one shows a ✓ Pass or ✕ Fail label, not just a color.
- Use Swap colors to test the reverse combination.
WCAG Contrast Requirements
| Level | Normal text | Large text | UI components |
|---|---|---|---|
| AA | 4.5:1 | 3:1 | 3:1 |
| AAA | 7:1 | 4.5:1 | — |
Large text means at least 24px regular or about 18.66px bold. Level AA is the standard most websites aim for.
How the Ratio Is Calculated
Each color is converted to its relative luminance using the WCAG formula, which adjusts RGB values for how the human eye perceives brightness. The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color. Results are rounded down so a borderline value is never reported as a pass.
Examples
#111827on white — about 17.7:1, passes AAA.#6C5CE7on white — about 4.85:1, passes AA for normal text.#94A3B8on white — about 2.6:1, fails for text.
Tips to Improve Contrast
- Darken the text or lighten the background in small steps using HSL lightness in the Color Picker.
- Avoid light grey text for important content.
- Do not rely on color alone to communicate meaning; add text labels or icons too.
Related Learning Guides
Frequently Asked Questions
What is a good contrast ratio?
At least 4.5:1 for normal text and 3:1 for large text meets WCAG AA. 7:1 or higher meets the stricter AAA level.
What counts as large text?
Text that is at least 24px in regular weight or about 18.66px (14pt) in bold.
Does contrast matter for buttons and icons?
Yes. WCAG asks for at least 3:1 contrast for interface components and meaningful graphics against their surroundings.
Why is my result rounded down?
To avoid false passes. For example, 4.499:1 is shown as 4.49:1 and fails the 4.5:1 requirement.
Does this tool check transparent colors?
It checks solid HEX colors. For semi-transparent text, check the final blended color you see on screen.