WCAG color contrast checker

WCAG color contrast checker & accessible palette generator

Pick a foreground and a background. The ratio, the four WCAG badges, and the preview update as you edit. Auto-Fix and the palette snippets stay on this device.

The colors you pick stay in this browser. This page does not post a palette or a snippet to a server.

The checker needs JavaScript in this browser. Without it, you can still read the guide, but live contrast, Auto-Fix, and copy will not run.

Contrast ratio 15.42:1

  • AA Normal Text 4.5:1 PASS
  • AA Large Text / UI 3.0:1 PASS
  • AAA Normal Text 7.0:1 PASS
  • AAA Large Text 4.5:1 PASS
Foreground
Background

Live preview

Section heading

Body text should stay readable at this size. If the paragraph feels faint, raise the contrast before you ship the pair.

Auto-Fix

Adjust

Color vision simulations

Eight simulations use Machado et al. 2009 linear-RGB matrices for the six red, green, and blue deficiencies, plus a luminance map for monochromacy and a 0.6 blend for partial monochromacy. They are approximations, not a clinical test.

Sample

Protanopia

15.42:1

Sample

Deuteranopia

15.42:1

Sample

Tritanopia

15.42:1

Sample

Protanomaly

15.42:1

Sample

Deuteranomaly

15.42:1

Sample

Tritanomaly

15.42:1

Sample

Achromatopsia

15.42:1

Sample

Achromatomaly

15.42:1

Accessible tint and shade scale

A ten-step scale built from the foreground, with contrast against white and against the editorial dark ink. Click a swatch to load it as the foreground. Copy CSS custom properties or a Tailwind theme snippet; the text is built on this device.

  • #fefefd vs white 1.01:1 vs dark 17.74:1
  • #fcfbf8 vs white 1.03:1 vs dark 17.30:1
  • #faf9f4 vs white 1.05:1 vs dark 16.98:1
  • #f7f5ee vs white 1.09:1 vs dark 16.41:1
  • #f5f1e7 vs white 1.13:1 vs dark 15.87:1
  • #f2eee1 vs white 1.16:1 vs dark 15.42:1
  • #c6c3b9 vs white 1.76:1 vs dark 10.15:1
  • #96948c vs white 3.04:1 vs dark 5.89:1
  • #66645f vs white 5.91:1 vs dark 3.03:1
  • #353432 vs white 12.44:1 vs dark 1.44:1

Questions

Do I need an account or a design file?

No. The checker runs in this browser. There is no file to upload and no sign-in.

Which WCAG version is this?

The ratio uses the WCAG 2.1 relative luminance formula. The contrast success criteria (1.4.3, 1.4.6, and 1.4.11) are unchanged in WCAG 2.2.

What does Auto-Fix change?

Only the lightness of the color you chose to adjust, keeping hue and saturation. If that cannot reach the target, the desk tries the other color. It does not invent a new hue.

Are the color-blindness tiles a diagnosis?

No. They are published-matrix simulations so you can see how a pair may shift. They are not a clinical test.

What is html-a11y-wcag-auditor?

A separate offline Python CLI in the jmforu.com skill catalog. It audits a local static site for a broader WCAG 2.1 AA checklist. This page measures one color pair. Write to ai@jmforu.com about the package.