Guide
WCAG 2.2 color contrast, explained simply
The contrast ratio measures how much the luminance of the text differs from that of the background. It ranges from 1:1 (the same color) to 21:1 (black on white). The higher the ratio, the easier the text is to read, especially in sunlight, on lower-quality screens, and for people with low vision.
What exactly WCAG requires
- 1.4.3 (AA): 4.5:1 for text, 3:1 for large text.
- 1.4.6 (AAA): 7:1 for text, 4.5:1 for large text.
- 1.4.11 (AA): 3:1 for icons, form field borders, and user interface components.
What the rules don't cover
Logos and text that is part of a logo, purely decorative elements, and inactive user interface components, such as a grayed-out button. Everything else must meet the requirements, including text over photos, placeholder text in form fields, and links.
Common mistakes
- Light gray text on white for a “clean” look.
- White text over a light part of a photo with no dark overlay.
- Placeholder text that blends into the field background.
- Marking errors with red alone, with no icon or text.
What is APCA?
APCA is a newer method for calculating contrast that better matches human perception, especially in dark mode. It's one of the candidate contrast methods for the upcoming WCAG 3, but no decision has been made yet, and it isn't a requirement. To comply with the law, go by the WCAG 2.2 contrast ratio and treat APCA as supplementary guidance.