HomeDesign ToolsContrast Checker

pick two colors. check the contrast.

test foreground and background colors against WCAG 2.1 accessibility standards. see pass/fail for AA and AAA at a glance.

Text Color
Background Color

Presets

Preview

Large Text (24px Bold)

Large Text (18px Bold)

Normal body text at 16px. This is how your paragraph copy will look against this background color.

Small text at 12px — captions, footnotes, and fine print.

Contrast Ratio

14.68:1

Excellent contrast — passes all WCAG levels

Pass

AA Normal

Requires 4.5:1

Pass

AA Large

Requires 3:1

Pass

AAA Normal

Requires 7:1

Pass

AAA Large

Requires 4.5:1

WCAG Guide

Normal Text

Body copy, paragraphs, and UI labels smaller than 18pt bold or 24pt regular.

Large Text

Headings and text at 18pt bold (24px) or 24pt regular (32px) and above.

Level AA

Minimum standard. Required by most accessibility laws and guidelines worldwide.

Level AAA

Enhanced standard. Recommended for maximum readability and inclusion.

What this tool does

Pick two colors — a foreground and a background — and the tool computes the WCAG 2 contrast ratio between them, plus which accessibility thresholds the pair passes or fails. A live preview shows what text actually looks like at the chosen colors.

The thresholds, in plain language

  • 4.5:1 — minimum for body text. This is the WCAG AA target most teams ship to. If you only remember one number, this is the one.
  • 3:1 — minimum for large text (18pt regular or 14pt bold) and for graphical elements like icons, focus indicators, and chart strokes.
  • 7:1 — WCAG AAA target. Roughly equivalent to body text being readable for users with mild visual impairments without assistive tech.

These come from low-vision research that mapped how much contrast different visual conditions need at typical reading distances. They are blunt — a single number cannot capture every visual phenomenon — but they represent a real attempt at a population-level guideline.

What the ratio means physically

A 1:1 ratio is two identical colors (invisible). A 21:1 ratio is pure black on pure white (the maximum). Most readable color combinations fall between 4 and 15. Below 3, text starts to require active effort to read; below 2, most people cannot read it without leaning into the screen.

The math involves linearizing each channel back from sRGB gamma encoding, weighting by perceived luminance (green contributes far more than blue), and dividing the resulting luminances. The full breakdown is in The math behind WCAG contrast checking — about ten minutes of reading if you want to know why certain color pairs feel different from what their numerical ratio suggests.

How to fix a failing pair

If your color pair fails the threshold you need, the lever with the highest leverage is lightness contrast, not hue or saturation.

Concretely: if dark blue text on white is failing, do not try to shift the blue toward another hue. Drop the lightness on the blue. Each 5% drop in HSL lightness typically buys you about 0.5 in the contrast ratio. A few clicks usually moves you from 3.8 to 4.5+.

The same applies in dark mode: light grey text on a dark background can be bumped past the threshold by raising the grey's lightness toward white. Hue changes are rarely the answer.

The pure-yellow-on-black trap

Pure yellow (#ffff00) on pure black gives a contrast ratio of 19.5:1 — well above AAA. It also looks terrible to read for any sustained text. The math passes; the eye still suffers from chromatic aberration and the high saturation of pure yellow at sharp letter edges. Lower the saturation and lightness slightly, give up a couple of points of ratio, and the text becomes comfortable to read.

WCAG 2 vs WCAG 3 / APCA

This tool computes the WCAG 2 ratio because that is still the standard your work will be audited against in 2026. WCAG 3 is in working-draft status and introduces a different algorithm (APCA — Accessible Perceptual Contrast Algorithm) that handles more edge cases — polarity (light-on-dark vs dark-on-light), font weight, and font size all factor in.

Until WCAG 3 is finalized and adopted into legal accessibility frameworks (ADA, EN 301 549, Section 508), WCAG 2 is what auditors measure. Use APCA as a sanity check on color pairs that WCAG 2 flags as a problem but feel fine to the eye — but ship to WCAG 2.

Where contrast rules tend to break in real designs

  • Brand colors as body text. A bright brand red on white usually passes for headlines and fails for paragraphs. Dark or muted variants of the brand color are necessary for body copy.
  • Placeholder text. The default light grey most form libraries ship is usually well below 4.5:1. Bumping it to a darker grey is a near-zero-cost accessibility win.
  • Focus indicators. The default browser focus ring is sometimes invisible against custom button colors. Custom focus rings need a 3:1 contrast against their surroundings.
  • Disabled state.“Disabled” in design language is usually low-contrast on purpose, but users still need to be able to read what the button says. The 3:1 threshold for graphical elements applies here.

Pairs well with

For picking the colors you want to test, see the color picker. For building gradients that maintain contrast across their full range, see the CSS gradient generator.

What this tool does

Pick two colors — a foreground and a background — and the tool computes the WCAG 2 contrast ratio between them, plus which accessibility thresholds the pair passes or fails. A live preview shows what text actually looks like at the chosen colors.

The thresholds, in plain language

  • 4.5:1 — minimum for body text. This is the WCAG AA target most teams ship to. If you only remember one number, this is the one.
  • 3:1 — minimum for large text (18pt regular or 14pt bold) and for graphical elements like icons, focus indicators, and chart strokes.
  • 7:1 — WCAG AAA target. Roughly equivalent to body text being readable for users with mild visual impairments without assistive tech.

These come from low-vision research that mapped how much contrast different visual conditions need at typical reading distances. They are blunt — a single number cannot capture every visual phenomenon — but they represent a real attempt at a population-level guideline.

What the ratio means physically

A 1:1 ratio is two identical colors (invisible). A 21:1 ratio is pure black on pure white (the maximum). Most readable color combinations fall between 4 and 15. Below 3, text starts to require active effort to read; below 2, most people cannot read it without leaning into the screen.

The math involves linearizing each channel back from sRGB gamma encoding, weighting by perceived luminance (green contributes far more than blue), and dividing the resulting luminances. The full breakdown is in The math behind WCAG contrast checking — about ten minutes of reading if you want to know why certain color pairs feel different from what their numerical ratio suggests.

How to fix a failing pair

If your color pair fails the threshold you need, the lever with the highest leverage is lightness contrast, not hue or saturation.

Concretely: if dark blue text on white is failing, do not try to shift the blue toward another hue. Drop the lightness on the blue. Each 5% drop in HSL lightness typically buys you about 0.5 in the contrast ratio. A few clicks usually moves you from 3.8 to 4.5+.

The same applies in dark mode: light grey text on a dark background can be bumped past the threshold by raising the grey's lightness toward white. Hue changes are rarely the answer.

The pure-yellow-on-black trap

Pure yellow (#ffff00) on pure black gives a contrast ratio of 19.5:1 — well above AAA. It also looks terrible to read for any sustained text. The math passes; the eye still suffers from chromatic aberration and the high saturation of pure yellow at sharp letter edges. Lower the saturation and lightness slightly, give up a couple of points of ratio, and the text becomes comfortable to read.

WCAG 2 vs WCAG 3 / APCA

This tool computes the WCAG 2 ratio because that is still the standard your work will be audited against in 2026. WCAG 3 is in working-draft status and introduces a different algorithm (APCA — Accessible Perceptual Contrast Algorithm) that handles more edge cases — polarity (light-on-dark vs dark-on-light), font weight, and font size all factor in.

Until WCAG 3 is finalized and adopted into legal accessibility frameworks (ADA, EN 301 549, Section 508), WCAG 2 is what auditors measure. Use APCA as a sanity check on color pairs that WCAG 2 flags as a problem but feel fine to the eye — but ship to WCAG 2.

Where contrast rules tend to break in real designs

  • Brand colors as body text. A bright brand red on white usually passes for headlines and fails for paragraphs. Dark or muted variants of the brand color are necessary for body copy.
  • Placeholder text. The default light grey most form libraries ship is usually well below 4.5:1. Bumping it to a darker grey is a near-zero-cost accessibility win.
  • Focus indicators. The default browser focus ring is sometimes invisible against custom button colors. Custom focus rings need a 3:1 contrast against their surroundings.
  • Disabled state.“Disabled” in design language is usually low-contrast on purpose, but users still need to be able to read what the button says. The 3:1 threshold for graphical elements applies here.

Pairs well with

For picking the colors you want to test, see the color picker. For building gradients that maintain contrast across their full range, see the CSS gradient generator.

more free tools

PDF utilities, image tools, developer helpers — all free, no signup.

Something wrong?