Scan a site
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Accessibility

Contrast Ratio

Published: · Updated:

Contrast ratio is the ratio of the relative luminance of the lighter color to the darker one, expressed on a scale from 1:1 (no contrast) to 21:1 (black on white). It is the basic measure of text readability and of distinguishability of interface elements for people with low vision — and for all users in difficult conditions, e.g. in sunlight.

WCAG 2.2 at level AA requires a contrast of at least 4.5:1 for normal text and 3:1 for large text (from 18 pt, or 14 pt bold). Criterion 1.4.11 extends the 3:1 requirement to interface components and informative graphics — icons, field borders, focus states.

WCAG thresholds at a glance

  • AA: 4.5:1 normal text, 3:1 large text and UI elements (SC 1.4.3, 1.4.11).
  • AAA: 7:1 normal text, 4.5:1 large text (SC 1.4.6).
  • Exceptions: logos, decorative text and inactive elements.

In practice

Contrast must be checked on real color combinations — including hover, focus and disabled states, and text on images and gradients. Note that WCAG 3 is working on a new perceptual model (APCA) that better reflects readability in dark themes.

Example

On a dark background (#0f0f0f), gray text #767676 fails AA (~3.8:1), while #b3b3b3 passes (~8.6:1).

Fails WCAG AA (normal text)
CSS
.card-caption {
  color: #767676;       /* ~3.8:1 on #0f0f0f */
  background: #0f0f0f;
}
Passes WCAG AA
CSS
.card-caption {
  color: #b3b3b3;       /* ~8.6:1 on #0f0f0f */
  background: #0f0f0f;
}

Sources & further reading

Check your site accessibility

Insight runs automated tests for selected WCAG-based accessibility rules and ranks detected issues by priority.

No credit card Report with date and sources No account required