Accessibility Contrast: A Complete Guide

Contrast is the most-cited accessibility issue in automated audits, and the most fixable. Get it right and your design is more readable for everyone — not just users with low vision. This guide covers the WCAG requirements, the math behind them, and the practical failures to watch for.

The WCAG Requirements

ElementWCAG AAWCAG AAA
Normal text (under 18pt or under 14pt bold)4.5:17:1
Large text (18pt+ or 14pt+ bold)3:14.5:1
UI components & graphics3:1
Decorative contentNo requirementNo requirement
Logos & brandExemptExempt

How Contrast Is Measured

WCAG contrast uses relative luminance — a perceptual measure of how light or dark a color appears. The formula:

Contrast = (L_lighter + 0.05) / (L_darker + 0.05)

Where L is computed from gamma-corrected RGB. The result ranges from 1:1 (identical colors) to 21:1 (pure black on pure white). Note that pure hue contrast doesn't help — bright red on bright green has high color contrast but poor luminance contrast.

Common Failures

  • Light gray on white. #999 on white is 2.85:1 — fails AA. #767676 is the minimum that passes AA (4.54:1).
  • Placeholder text. Often styled at very low contrast; treat as required content and apply AA rules.
  • Buttons on bright colors. White text on yellow or light blue typically fails. Test before shipping.
  • Disabled states. WCAG technically exempts disabled elements, but readable disabled states improve UX. Aim for 3:1.
  • Focus rings. The focus indicator needs 3:1 against both the unfocused element and the page background.
  • Color-only signals. Red text alone for errors fails users with color blindness. Always pair with icon or label.

A Reliable Workflow

  1. Pick text and background pairs early, check ratios with a tool, lock them into design tokens.
  2. Establish a "minimum text color" — the lightest gray that passes AA on your background.
  3. Test interactive states (hover, focus, active, disabled) for contrast too.
  4. Run automated audits (axe, Lighthouse, WAVE) on every page before shipping.
  5. Test with real low-vision users or contrast simulators for nuanced issues.

Try It Yourself

Extract a palette and verify contrast across all color pairs with DesignKit's color tools.

Color Palette Extractor →

Frequently Asked Questions

A measured ratio between text and background luminance, from 1:1 (none) to 21:1 (max). Higher = more readable.
AA: 4.5:1 normal text, 3:1 large text — practical standard, required by most laws. AAA: 7:1 normal, 4.5:1 large — enhanced level.
(L_lighter + 0.05) / (L_darker + 0.05), where L is relative luminance from gamma-corrected RGB.
Yes — 3:1 for UI components and meaningful graphics per WCAG 1.4.11. Decorative graphics are exempt.
Light gray on white, placeholder text, white on bright buttons, color-only error indicators.