AllKit

Color Contrast Checker — WCAG AA / AAA Ratios

100% freeRuns in your browserNo sign-up

Large text 24px

Normal text 16px — the quick brown fox jumps over the lazy dog.

Links and underlined text

Contrast ratio
10.31 : 1
✓AA — normal text4.5:1
✓AA — large text (18pt/24px+)3:1
✓AAA — normal text7:1
✓AAA — large text4.5:1
✓UI components & graphics3:1

Computed locally with the WCAG 2.1 relative-luminance formula.

About the Color Contrast Checker

Color Contrast Checker computes the WCAG contrast ratio between a text color and its background as you adjust either side. Big live preview, the ratio to two decimals, and pass/fail badges for every threshold: AA (4.5:1) and AAA (7:1) for normal text, relaxed 3:1 rules for large text, and the 3:1 UI-component minimum for icons and borders.

Pick colors with the native pickers, type hex codes, or start from presets that mirror real-world failures — gray body text on white, brand-colored buttons. Swapping foreground and background is one click. All math runs locally with the WCAG 2.1 relative-luminance formula.

How to use the Color Contrast Checker

  1. Choose a text color and a background color (picker or hex).
  2. Read the live ratio and the AA/AAA badges.
  3. Adjust until the rows you need show ✓ — the preview always shows the real rendering.

How WCAG contrast is computed

Relative luminance (WCAG 2.1):
  L = 0.2126·R + 0.7152·G + 0.0722·B
  where each channel c ∈ [0,1] is linearized:
  c ≤ 0.04045 → c/12.92   otherwise ((c+0.055)/1.055)^2.4

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

Thresholds (WCAG 2.1):
  AA  normal text 4.5:1 · AA  large text 3:1
  AAA normal text 7:1   · AAA large text 4.5:1
  UI components & meaningful graphics 3:1
Large text = ≥18pt (24px), or ≥14pt (18.66px) bold.

Frequently asked questions

What ratio do I need to pass WCAG AA?

4.5:1 for normal text and 3:1 for large text (24px+, or 18.66px+ bold). AAA raises the bar to 7:1 and 4.5:1. Non-text elements like input borders and icons need 3:1.

Does the ratio depend on font size?

The ratio itself is purely color math; font size only decides which threshold applies — that is why large text gets a relaxed limit.

Why does gray #6b7280 on white fail AA?

It measures ≈4.6:1 on pure white… borderline in practice: it passes on #fff exactly, but on slightly tinted backgrounds it drops below 4.5:1. Test your actual background — that is what the tool is for.

Is this the same test as Lighthouse?

Yes — Lighthouse flags the same WCAG 2.1 contrast failures. This tool lets you explore fixes interactively before running an audit.

Related tools