Contrast Checker
Check whether a text and background color pair meets WCAG 2 contrast requirements.
Transparent colors are blended: the text over the background, the background over white.
Large text sample
Normal text reads like this. The quick brown fox jumps over the lazy dog.
- AA Normal text 4.5:1
- AA Large text 3:1
- AAA Normal text 7:1
- AAA Large text 4.5:1
About the contrast checker
What is color contrast and why does it matter?
Contrast ratio compares the brightness of two colors, from 1:1 (identical) to 21:1 (black on white). Text with too little contrast is hard to read for many people, including those with low vision, color blindness, a dim screen or bright sunlight on the display.
The Web Content Accessibility Guidelines (WCAG) set minimum ratios so that text stays legible. Meeting them is also part of many accessibility laws and procurement requirements.
WCAG AA and AAA requirements
Level AA asks for at least 4.5:1 for normal text and 3:1 for large text (24px regular or 18.66px bold and up). Level AAA is stricter: 7:1 for normal text and 4.5:1 for large text.
Most sites aim for AA. AAA is worth targeting for long reading content or when your audience is likely to include many people with low vision.
How the ratio is calculated
The checker converts each color to relative luminance, a measure of perceived brightness that weights green most and blue least, then divides the lighter value (plus 0.05) by the darker one (plus 0.05). The result is the same formula WCAG 2 defines, so the numbers match other WCAG checkers.
Fixing a failing color pair
If a pair fails, darken the text or lighten the background (or the reverse on dark designs). The suggestions below the score keep your hue and move only the lightness until the target ratio is met, so the fix still looks like your brand.
WCAG contrast requirements at a glance
These are the thresholds the checker tests. The ratio is the brightness difference between text and background.
| Content | Level AA | Level AAA |
|---|---|---|
| Normal text (under 24px, or under 18.66px bold) | 4.5 : 1 | 7 : 1 |
| Large text (24px+, or 18.66px+ bold) | 3 : 1 | 4.5 : 1 |
| Icons, borders and form controls | 3 : 1 | No separate requirement |
| Logos and decorative elements | No requirement | No requirement |
What different contrast ratios look like
Black or white text on a range of grays. Notice how quickly text gets hard to read below 4.5:1.
Popular color pairs, checked
Some pairings look fine on a designer's monitor and still fail. Select one to open it in the checker.
The most readable pair in each curated palette
For every Huegrove palette, the two colors with the highest contrast, ready to use as text and background.
- AaThe quick brown fox11.32:1AAA
- AaThe quick brown fox9.26:1AAA
- AaThe quick brown fox7.21:1AAA
- AaThe quick brown fox5.17:1AA
- AaThe quick brown fox6.45:1AA
- AaThe quick brown fox12.32:1AAA
- AaThe quick brown fox6.53:1AA
- AaThe quick brown fox7.03:1AAA
- AaThe quick brown fox5.90:1AA
- AaThe quick brown fox9.53:1AAA
- AaThe quick brown fox5.82:1AA
- AaThe quick brown fox7.24:1AAA
Download the reference files
Using the contrast checker
- Enter a text color and a background color. The ratio and results update as you type.
- Large text means at least 24px regular or 18.66px bold (18pt / 14pt bold).
- This checks one color pair only. Accessible design also depends on font size, weight, focus states and the rest of the page.
Frequently asked questions
What contrast ratio do I need for accessible text?
At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA. For AAA you need 7:1 and 4.5:1.
Does contrast apply to buttons and icons?
WCAG 2.1 asks for at least 3:1 for essential user interface components and graphics, such as input borders and icons that carry meaning. Check them as a text and background pair here and compare to 3:1.
What counts as large text?
Text at 24px or larger, or 18.66px or larger if bold (18pt and 14pt bold in print terms).
Does this checker support transparent colors?
Yes. Colors with an alpha value are blended first: the text over the background, and the background over white.
Is a passing ratio enough for accessibility?
No. Contrast is one requirement. Font size, weight, spacing, focus indicators and not relying on color alone also matter. Treat a passing ratio as a baseline.