Colour contrast for text: what the ratios mean
A contrast ratio is a score for how different two colours look in brightness. Higher means easier to tell apart. The minimum for normal body text is 4.5 to 1.1
What the numbers mean
Contrast in the Web Content Accessibility Guidelines (WCAG) is the difference in perceived brightness between two colours. It's written as a ratio from 1:1 (white on white) to 21:1 (black on white).2 WCAG is the standard that most accessibility rules point to.
The minimums
| What it applies to | Level AA (the usual target) | Level AAA (stricter) |
|---|---|---|
| Body text | 4.5:11 | 7:11 |
| Large text | 3:11 | 4.5:11 |
| Buttons, form borders, icons | 3:11 | Not defined1 |
Level AA is the one most guides aim for. Start there. Level AAA asks for 7:1 on normal text.1 It's higher contrast, and it's not always possible within a design.
What counts as large text
- At least 18pt, or at least 14pt if bold.1
- In pixels, that's about 24 pixels, or about 18.67 pixels when bold.2
Most body paragraphs aren't large text. Treat them as normal text, and aim for at least 4.5:1.1 If you're unsure whether a heading counts as large, test it as normal text. That's the stricter way to be sure it's readable, and it costs you nothing but a slightly darker colour.
Rules that catch people out
- No rounding. You can't round a ratio up to 4.5:1.2 A 4.47 fails, even though it looks fine.
- Text on pictures. When text sits on a gradient or a photo, check where the contrast is lowest.2 That spot decides how readable the line is.
- Not just text. Interface parts like buttons and icons need at least 3:1 too.1
- Colour alone isn't enough. Don't use colour as the only way to show something, such as a link or an error. Add another cue. Icons and symbols should differ by shape as well as by colour.3
A worked example
Say your page has mid-grey paragraph text on white. Your checker reports a ratio just under 4.5:1. That's a fail for body text, however close it is.2
The fix is to darken the text colour a little and test again. Leave the layout alone. Done.
Then check the other places the same colour appears, such as links, captions and the footer. A colour that fails in one spot will fail anywhere else it sits on the same background.
Where to go next
- To run the numbers on your own pages, use the step-by-step checking guide.
- To pick colours that work together from the start, try the palette notes.
- Text size also affects how readable weak contrast text is. The type size notes cover that.
Contrast is only one part of making a page readable. Passing doesn't mean every visitor finds the page comfortable, because people differ in their eyesight, their screens and the light in the room. It gives you a clear, shared test to start from, and that's worth having.
Common questions
Where the facts come from
- Color contrast, MDN Web Docs
- Understanding WCAG 2 Contrast and Color Requirements, WebAIM
- Use of color, MDN Web Docs