Key takeaways
- AA needs 4.5:1 for body text and 3:1 for large text.
- AAA needs 7:1 for body text and 4.5:1 for large text.
- Test every text and background pair, including hover states.
Text is only useful if people can read it. The Web Content Accessibility Guidelines (WCAG) measure this with a contrast ratio between text and background, from 1:1 (identical) to 21:1 (black on white).
The targets
Level AA asks for at least 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 for normal text and 4.5:1 for large text. Large means roughly 24px regular or 19px bold and above.
A handy reference point
Gray #767676 on white is about 4.5:1, which is close to the lightest gray that still passes AA for body text. Anything lighter needs a larger size or a darker shade.
Check your own pair
Open the contrast checker, pick your text and background colors, and it shows the ratio and which levels pass. Every color page on this site also shows its contrast against white and black.