
WCAG Color Contrast: Understanding 4.5:1 Ratio
Want to know how your own site is doing?
Color contrast is the #1 accessibility error globally. We explain the math, showcase the tools, and provide practical design recommendations.
Author: Kodulehehaldus
Why is contrast important?
According to the WebAIM Million 2024 report, low contrast is the primary error on 81% of websites – and the easiest one to fix.
Contrast doesn't only affect people with visual impairments. It helps:
- Older users (40+ years, tired eyes)
- Mobile users in direct sunlight
- Color blind users (8% of men, Colour Blind Awareness)
WCAG Requirements
| Content Type | AA | AAA |
|---|---|---|
| Normal text (<18pt) | 4.5:1 | 7:1 |
| Large text (≥18pt or 14pt bold) | 3:1 | 4.5:1 |
| UI elements, icons | 3:1 | — |
| Logos | exempt | exempt |
How is contrast measured?
The ratio ranges from 21:1 (black on white) to 1:1 (same color). The formula is documented by W3C:
(L1 + 0.05) / (L2 + 0.05)where L1 and L2 are the relative luminance of the colors.
Tools
- WebAIM Contrast Checker – the most popular
- Coolors Contrast
- Chrome DevTools – Inspect element → Styles → click on color
- Stark – Figma plugin for designers
Typical Mistakes
Grey text on white
#999 on white is 2.85:1 – failed. Use #767676 (4.54:1).
Blue link on white
#0066CC is 5.74:1 – ok. But pure blue #0000FF is 8.59:1 – even better.
Disclaimers and "fine print"
Small grey text in the footer is a classic mistake. Make it at least #595959 (7:1) on white.
Buttons with gradients
If text is placed on a gradient, measure the contrast against both ends of the gradient.
What if brand colors don't comply?
A frequent concern: "our brown/orange brand color doesn't work with white."
Solutions:
- Darken the color for text only – the brand remains, but the text uses a darker variation
- Use color as a background – keep text on a white background and use the color as an accent
- Add shadows or outlines – for buttons and headers
- Create a tonal palette – our article on B2B website strategy explains more
Practical Action Plan
- Audit your current site with WAVE
- Create an Excel table of all color pairings
- Fix critical errors (below 3:1)
- Add CSS variables for accessible variations
- Document these as rules in your design system
Read also WCAG 2.2 guide and web design trends 2026.
Need a color palette audit? Check out our web design service.
Join the newsletter
Once a month, practical tips on making your website faster, more secure and easier to find on Google and in AI search.
Author
Kodulehehaldus.com (Innov8it OÜ) – an Estonian web agency that builds, maintains and optimises websites.