Why contrast matters
Low-contrast text is hard to read for people with low vision or colour blindness, for older readers, and for everyone on a phone in sunlight. Good contrast is one of the simplest accessibility improvements and makes a site easier to use for all visitors.
The WCAG contrast levels
| Level | Normal text | Large text |
|---|---|---|
| AA | 4.5 : 1 | 3 : 1 |
| AAA | 7 : 1 | 4.5 : 1 |
Icons, form borders, focus indicators and other parts of the interface that people need to see should reach at least 3 : 1 against what is next to them. Most accessibility rules and policies refer to the AA level.
What counts as large text
Large text is at least 18 point, about 24 CSS pixels, or 14 point bold, about 18.7 CSS pixels. Body text, captions, labels and placeholder text are normal text and need the higher ratio.
Practical tips
- Check every state: hover, focus, disabled and visited links.
- Placeholder text in forms is often too light. Do not rely on it for important instructions.
- Text on photos needs an overlay or a solid background behind it.
- Do not use colour alone to show meaning, such as red for errors. Add text or an icon.
How the ratio is calculated
The ratio compares the relative luminance of the two colours, using the formula defined in WCAG 2. It ranges from 1 : 1, for identical colours, to 21 : 1, for black on white. Results are shown to two decimals and never rounded up, because a colour pair at 4.49 : 1 does not pass AA.
Questions, answered
At least 4.5 : 1 for normal text and 3 : 1 for large text to meet WCAG AA, the level most accessibility requirements refer to.
No. Enter the final visible colours. For semi-transparent text, use the colour it appears as on the background.
A different method, known as APCA, is being explored for future versions of WCAG. Today, WCAG 2 ratios remain the standard to meet.