WCAG Color Contrast: The Designer's Field Guide
Contrast is the accessibility rule designers hit first and most often. The rules are simpler than they look — and the fixes are usually small.
The numbers that matter
| Element | AA minimum | AAA target |
|---|---|---|
| Body text (under ~18pt) | 4.5:1 | 7:1 |
| Large text (18pt+, or 14pt bold) | 3:1 | 4.5:1 |
| UI components & icons | 3:1 | — |
| Decorative elements, logos | exempt | exempt |
The ratio compares relative luminance — effectively how bright each color is to the human eye — on a scale from 1:1 (identical) to 21:1 (black on white).
The traps everyone falls into
- Gray on white: the classic #999999 placeholder gray is 2.85:1 — it fails. #767676 is the lightest gray that passes AA on white.
- White on brand colors: mid-tone blues, greens and oranges often sit between 2.5:1 and 4:1 with white text. Your buttons live here.
- Vibrating complements: two saturated complementary colors can have high hue contrast but near-identical luminance — technically failing and physically uncomfortable.
- Disabled ≠ unreadable: dimming disabled controls is allowed, but users still need to find them.
Fixing a failing pair without losing the brand
Keep the hue, move the lightness. Darkening a brand blue from 45% to 38% lightness usually gets white text past 4.5:1 while staying recognisably the same blue. Our contrast checker does this automatically — it suggests the nearest passing shade with one click.
One more habit: check contrast in both themes. A color that passes on white often fails on a dark surface, which is exactly why full shade scales beat single HEX codes.
Sources and further reading
- Understanding Success Criterion 1.4.3: Contrast (Minimum) · W3C Web Accessibility Initiative
- Understanding Success Criterion 1.4.6: Contrast (Enhanced) · W3C Web Accessibility Initiative
- Understanding Success Criterion 1.4.11: Non-text Contrast · W3C Web Accessibility Initiative
- WCAG 2.2: definition of relative luminance · W3C