Guide
Checking color contrast against WCAG, and fixing failures
Low contrast is one of the most common accessibility problems on the web: light gray text, white text on yellow buttons, pale placeholders. It affects people with low vision, older readers, anyone on a phone in sunlight, and anyone with a dimmed or cheap screen. This checker calculates the WCAG contrast ratio for any text and background pair, shows which levels pass, and suggests the nearest passing color when they don’t.
Checking a pair
- Enter the text color and the background as hex, rgb(), hsl() or a color name, or use the pickers.
- Read the ratio and the preview of normal and large text.
- Check the badges for each category.
- Use the swap button to test the reverse combination, such as a dark section with light text.
The thresholds
| Element | AA (minimum) | AAA (enhanced) |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text (24 px, or 18.5 px bold) | 3:1 | 4.5:1 |
| Icons, input borders, focus rings, chart parts | 3:1 | — |
AA is the level most laws, procurement rules and company policies refer to. AAA is worth aiming for in long reading content, such as articles and documentation.
The ratio runs from 1:1 (identical colors) to 21:1 (black on white). It’s based on relative luminance, how bright each color appears, so two very different hues, such as red and green, can have almost no contrast.
When a color fails
If normal text doesn’t reach 4.5:1, the checker searches for the closest passing text color: the same hue, darkened (or lightened on dark backgrounds) just enough to pass. Click Use it to apply it, then copy the new value into your design. Because only lightness changes, the color usually still feels like the original.
If the brand color itself must stay as it is, options include:
- Use it for large headings, icons or backgrounds, where 3:1 applies, and use a darker variant for body text.
- Put text on the brand color in white or near-black, whichever passes.
- Add a darker shade to the palette specifically for links and small text; the Color Converter builds shade scales.
Common failures
- Gray body text like #999 on white (2.85:1). #767676 is the lightest gray that passes AA on white.
- Placeholders and disabled-looking hints that people actually need to read.
- White text on bright buttons such as orange, yellow, light green or sky blue.
- Text over photos: contrast changes across the image. Add a dark overlay or a solid panel behind the text, and check the lightest part of the image.
- Semi-transparent text: the checker blends it onto the background first, which is how it really appears.
Beyond the number
Passing the ratio is the minimum, not the goal. Thin or very small fonts, long lines and busy backgrounds hurt readability even at a passing ratio. Never use color alone to convey meaning, such as red for errors; add an icon or text. And check dark mode separately, since a palette that passes in light mode often fails when inverted.
Who checks contrast
- Web designers and developers meet accessibility requirements (WCAG) for text and buttons.
- Public sector and education websites must meet accessibility standards in many countries.
- Brand managers check whether brand colors work for text.
- Presenters and teachers make slides readable on projectors, which wash colors out.
A complete example: an orange button
A brand orange #FF6600 with white button text:
- Enter white as text and #FF6600 as background: about 2.9:1, which fails AA for normal text.
- Try dark text instead: black on #FF6600 reaches about 7.2:1, passing AAA.
- Or keep white text and darken the button: use the suggested passing color, or a darker shade from the Color Converter scale.
- Decide with the brand owner, then apply the change across all buttons.
Tips
- Check hover, focus and disabled states too.
- Test on a phone outdoors; real conditions are harsher than a monitor.
Related tools
- Color Converter for shade scales and quick contrast on white and black.
- Color Palette Generator to build a palette, then check its pairs here.
- Readability Checker for the other half of readable content: the words.
Checked against the current version of the Contrast Checker on .

