Color Contrast Checker
Large text sample
Normal body text sample.Normal body text, the size most of a page is set in. It needs the highest contrast to stay readable.
Contrast ratio
4.54:1
- Normal text AA (4.5:1)Pass
- Normal text AAA (7:1)Fail
- Large text AA (3:1)Pass
- Large text AAA (4.5:1)Pass
- UI components (3:1)Pass
Quick answer
What is the Color Contrast Checker?
A color contrast checker compares a text color with its background and gives the contrast ratio, from 1:1 (no contrast) to 21:1 (black on white). WCAG 2 asks for at least 4.5:1 for normal text and 3:1 for large text and UI components at level AA, and 7:1 and 4.5:1 at level AAA.
Key features
- Color pickers and hex input
- Contrast ratio with AA and AAA results
- Live text, large text and button preview
- Suggested passing color
Why use it
- Meet WCAG contrast requirements
- Readable text for everyone
- Free, no sign-up
Built and tested by Whitson Rao
Color Contrast Checker: How to Check Two Colors
- Set the text color: use the picker, or type or paste a hex code such as #1A73E8 (short codes like #333 work too).
- Set the background color the same way.
- Read the contrast ratio and the pass or fail result for each level, with a live preview of your colors.
- If the pair fails, tap the suggested color, or press Swap to flip text and background.
The suggestion keeps your hue and changes only lightness, as little as needed to pass. The color contrast checker works as a contrast checker and contrast test for text, links, buttons and icons.
Color Contrast Checker Results: WCAG AA and AAA
WCAG 2 sets these minimum contrast ratios:
| Level | Normal text | Large text | UI components and graphics |
|---|---|---|---|
| AA (the usual target) | 4.5:1 | 3:1 | 3:1 |
| AAA (enhanced) | 7:1 | 4.5:1 | No extra requirement |
- Large text means at least 24px regular, or about 18.7px (14pt) bold.
- UI components include button borders, input outlines, focus rings and meaningful icons.
- Logos and purely decorative text have no contrast requirement.
How the Color Contrast Checker Calculates the Ratio
Contrast ratio compares the relative luminance (perceived brightness) of two colors, from 1:1 for identical colors to 21:1 for black on white:
ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance.
The color contrast checker rounds the ratio down, never up: 4.499:1 shows as 4.49:1 and fails AA, as WCAG intends.
Color Contrast Checker for Accessibility and ADA
The ADA doesn't list approved colors. In practice, WCAG 2 level AA is the usual benchmark for accessible colors, and US Section 508 points to it too. A pair that passes AA here meets the WCAG color contrast part of that.
What this color contrast checker doesn't cover:
- Whole websites: it checks one color pair at a time, not every page.
- Text over images, gradients or transparent colors: check the lightest and darkest area behind the text.
- Other WCAG rules, such as not using color alone to show meaning.
Color Contrast Checker Tips for Readable Design
- Run body text, links, placeholder text and disabled states through the color contrast checker; light gray is the most common failure.
- Check dark mode separately; a pair that works on white may fail on dark gray.
- Use brand colors that fail for text as accents or backgrounds with white or black text instead.
- Very high contrast, like pure white on pure black, can feel harsh in long text; slightly off-white or off-black still passes AAA.
To see how colors look on your actual display, try the screen color test.
FAQ
What is a good contrast ratio?
At least 4.5:1 for normal text and 3:1 for large text and UI components (WCAG AA). 7:1 or more is excellent and meets AAA.
Does the color contrast checker support WCAG 2.2?
Yes. The contrast rules and formula are the same in WCAG 2.0, 2.1 and 2.2, so the results apply to all three.
Can I check colors with transparency?
Not directly. Enter the final color you see on screen, after any transparency is blended with the background.