← Home Β· πŸ‘οΈ Contrast Checker

WCAG Color Contrast Explained: AA/AAA Ratios, Formula, and How to Check

Updated August 22, 2026 Β· Read time: ~5 min Β· Part of the Web Toolkit dev guide series

β€œContrast ratio 4.5:1” β€” you've seen it in Lighthouse reports, accessibility audits, and every WCAG checklist. But what does the number actually mean, how is it computed, and which pairs pass? This guide explains the WCAG contrast formula (WCAG 2.x), the AA/AAA thresholds, and shows you working examples you can verify yourself in thirty seconds.

The one-line rule

Body text needs at least 4.5:1; large text (18px+ or 14px+ bold) needs 3:1 β€” and AAA raises both to 7:1 and 4.5:1. If you remember nothing else, remember those four numbers.

1. What a contrast ratio actually is

The ratio compares the relative luminance of two colors β€” how bright they appear to a human eye, not their RGB values. The formula from WCAG 2.x is:

contrast = (L_lightest + 0.05) / (L_darkest + 0.05)

where L is relative luminance:
  L = 0.2126Β·R' + 0.7152Β·G' + 0.0722Β·B'

and each channel is linearized first:
  c <= 0.03928 β†’ c/12.92
  c >  0.03928 β†’ ((c + 0.055)/1.055)^2.4

The three coefficients (0.2126 / 0.7152 / 0.0722) mirror human color sensitivity: we are far more sensitive to green than to blue, which is why pure blue is a famously bad text color despite looking β€œdark.”

2. The thresholds (memorize this table)

LevelNormal textLarge text (18pt/24px, or 14pt bold)UI components / graphics
AA (minimum)4.5 : 13 : 13 : 1
AAA (enhanced)7 : 14.5 : 1β€”

AA is the legal and practical baseline (Section 508, EN 301 549, ADA case law). AAA is a stretch goal for long-form reading β€” most sites don't need it for everything.

3. Real examples, verified

The takeaway: avoid β€œdesign greys” (any grey text lighter than roughly #767676 on white). Light greys are the #1 contrast failure in real websites.

4. How to check any pair instantly

Instead of doing the math by hand, use our free in-browser contrast checker β€” pick two colors and see the ratio, the AA/AAA badges, and a live preview in one click. Nothing is uploaded:

Enter a text color and background color β€” get the WCAG ratio and AA/AAA verdict instantly.

Open Color Contrast Checker

5. Common mistakes

  1. Judging by eye β€” human perception is terrible at this; a pair you think looks fine can fail at 3:1.
  2. Forgetting large-text exceptions β€” headers pass at 3:1, but the same color as body text fails at 4.5:1.
  3. Ignoring opacity β€” text rendered at 80% opacity blends with the background; test the rendered color, not the declared one.
  4. Failing disabled states β€” disabled buttons/labels are often exempt, but only if genuinely disabled (not just visually grey).
  5. Assuming black-on-white always works β€” it does (21:1), but pure white on light UI rarely does.

6. Frequently asked questions

What is the minimum contrast ratio for text? 4.5:1 for normal text and 3:1 for large text under WCAG AA.

How do I compute the ratio? Use the formula above, or any checker β€” the math is deterministic, so every reliable tool returns identical results for the same two colors.

Does WCAG 2.2 change the ratios? No β€” 2.2 kept the contrast requirements unchanged; it added new success criteria (e.g., focus appearance) but the 4.5:1 / 3:1 numbers remain.

What about WCAG 3.0 (APCA)? The next generation proposes a different perceptual model (APCA) with non-linear scores. It's still a draft; design for WCAG 2.x AA today.

Are logos and decorative content exempt? Yes β€” text that is part of a logo, brand name, or purely decorative is excluded from contrast requirements.

β˜• Support this free tool β€” every tip keeps it ad-free
← Toolkit Β· Premium Β· Privacy