Low contrast is one of the most common accessibility problems on the web – light grey text on white is everywhere. It affects people with low vision, colour vision deficiencies and anyone reading in sunlight. See choosing a colour palette for the design side.
The requirements (WCAG AA)
| Element | Minimum contrast |
|---|---|
| Normal text | 4.5:1 |
| Large text | 3:1 |
| Icons and graphical objects needed to understand content | 3:1 |
| Borders of form fields and buttons, focus indicators | 3:1 against adjacent colours |
| Logos and decorative elements | No requirement |
Testing
- Our free contrast checker.
- Browser developer tools show contrast ratios when inspecting text.
- Automated tools flag low contrast across pages (see testing tools).
- Test text on images and gradients at the worst point.
Do not rely on colour alone
| Problem | Better |
|---|---|
| Required fields only in red | Add “(required)” or an icon with a text alternative |
| Links only distinguished by colour | Underline links in body text |
| Chart lines in red and green | Add labels, patterns or markers |
| Error state only a red border | Add an error message text |
States and themes
Check hover, focus, disabled and visited states, and repeat everything for dark mode. Respect user settings such as forced colours (Windows high contrast) by using real borders and outlines rather than background tricks.
Frequently asked questions
What counts as large text?
Roughly 18 point (24 CSS pixels) regular text, or 14 point (about 18.7 CSS pixels) bold text and larger.
My brand colour fails contrast – what now?
Use it for large elements and backgrounds with dark or white text that passes, and create a darker or lighter shade of the brand colour for small text and links.