WCAG Contrast Ratio Explained: What 4.5:1, 3:1 and 7:1 Really Mean

Every accessibility audit comes down to one number: the contrast ratio between your text and its background. This guide explains what that number is, how it is calculated, what the WCAG thresholds actually require — and shows worked examples with real numbers, so you never have to guess again.

The ratio, in one formula

A contrast ratio compares the relative luminance of two colors — roughly, how much light each one reflects. The lighter color goes on top:

ratio = (Llighter + 0.05) / (Ldarker + 0.05)

Luminance is not brightness as your eye perceives a slider: each sRGB channel is first converted to linear light, then weighted — green counts most (0.7152), then red (0.2126), then blue (0.0722). That weighting is why a vivid blue can be darker, in ratio terms, than a muted green that looks similar. The result runs from 1:1 (identical colors) to 21:1 (black on white, the maximum).

The thresholds you actually need

LevelNormal textLarge textNon-text (icons, borders, focus indicators)
WCAG AA (the usual legal / procurement bar)≥ 4.5:1≥ 3:1≥ 3:1
WCAG AAA (enhanced)≥ 7:1≥ 4.5:1—

"Large text" means at least 18pt (about 24px), or 14pt (about 18.66px) bold. Everything smaller is normal text. Note the trap: AAA for large text (4.5:1) is exactly AA for normal text — the same pair can be AAA at headline size and merely AA in body copy.

Worked example: the gray that barely passes

Medium gray #767676 on white has a relative luminance of 0.1812. Plug it in:

(1.00 + 0.05) / (0.1812 + 0.05) = 4.54:1

That passes AA for normal text — by 0.04. One shade lighter and it fails. This is why placeholder text and secondary labels, usually set in exactly this gray range, are the most common audit failure on otherwise clean sites:

Gray on whiteRatioVerdict for normal text
#AAAAAA2.32:1Fail (even fails large text)
#7676764.54:1AA — barely
#5959597.00:1AAA

The fix ladder is simple: darken the text one step at a time until the ratio clears your target with margin — do not ship a 4.54:1 pair and hope nobody re-measures it. A comfortable target is 7:1 for body text if you can get there without wrecking the design.

Common pairs, scored honestly

All ratios below are computed with the WCAG 2.1 formula, not estimated:

PairRatioNormal textLarge text
White on #0055CC (link blue)6.62:1AAAAA
White on #0066CC5.57:1AAAAA
White on #1A7F37 (success green)5.08:1AAAAA
White on #B42318 (error red)6.57:1AAAAA
Black on #FFD700 (gold)14.97:1AAAAAA
#E53935 on white (bright red)4.23:1FailAA
#FF0000 on #FFFF003.72:1FailAA

Two lessons hide in that table. First, saturated brand colors are not automatically safe: bright red #E53935 on white fails AA for body text despite looking bold and clear. Second, hue difference is not contrast: pure red on pure yellow screams visually, yet scores only 3.72:1 because their luminances are close. If you judge contrast by eye, you will ship failures.

See it, don't just read it

Gray #767676 on white — 4.54:1, passes AA by a hair.
Red #E53935 on white — 4.23:1, fails AA for normal text.
White on #0055CC — 6.62:1, a solid AA pass.

Quick checklist before you ship

Check your own colors in 10 seconds

Enter any foreground and background color — the free checker computes the exact WCAG ratio and grades it against AA and AAA.

Open the Contrast Checker

FAQ

What is a good contrast ratio for text?

At least 4.5:1 for normal text (WCAG AA) and at least 3:1 for large text. 7:1 is the stricter AAA level for normal text. Anything below 3:1 fails for text of any size.

How is a contrast ratio calculated?

From the relative luminance of the two colors: ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance and L2 the darker one's. Luminance weights green most (0.7152), then red (0.2126), then blue (0.0722), after converting sRGB to linear light.

What counts as large text for the 3:1 threshold?

Text at least 18pt (about 24px), or 14pt (about 18.66px) bold. Everything smaller is normal text and needs 4.5:1 at AA level.

Does 4.5:1 mean the colors look very different?

Not necessarily. The ratio measures luminance difference, not hue difference. Pure red on pure yellow looks strikingly different yet scores only 3.72:1 — it fails AA for normal text. Never judge contrast by eye.

What is the fastest way to check my own color pair?

Use ContrastLab's free contrast checker: enter your foreground and background colors and it computes the exact WCAG ratio and grades it against AA and AAA instantly.