ToolSphere

WCAG Contrast Checker

More tools

Test color contrast ratios against WCAG 2.1 AA and AAA accessibility standards for normal text, large text, and UI components with passing shade fixes.

Large heading at 24px

Body copy at the default size. If this is hard to read on your own screen, the ratio below is telling you the truth.

Ratio
3.59:1
Normal text
Fail
needs 4.5:1
Large text
AA Large
needs 3:1
UI & icons
Pass
needs 3:1
Nearest passing shade of your color:#5d7c6d

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use WCAG Contrast Checker

  1. 1Enter or pick a text color and a background color.
  2. 2Read the ratio and the verdicts for normal text, large text and UI components.
  3. 3If normal text fails, apply the suggested nearest passing shade of your own color.
  4. 4Check the live preview as well as the number — a passing ratio can still be uncomfortable at small sizes.

About WCAG Contrast Checker

What the contrast ratio actually measures

WCAG contrast is not a measure of how different two colors look — it is a ratio of their relative luminance, the brightness a standard observer perceives. Green contributes far more to that figure than blue does, which is why a mid blue on black can fail while a mid green on black passes, even though both look equally "colored" to a designer.

The ratio runs from 1:1 (the same color) to 21:1 (black on white). The formula divides the lighter color's luminance plus 0.05 by the darker color's luminance plus 0.05, and this tool implements it exactly as the specification states rather than approximating.

The thresholds, and why there are three

  • 4.5:1 — normal text (AA). The baseline for body copy. This is the number most audits are failed on.
  • 3:1 — large text (AA). Text at 24px, or 18.66px if bold, counts as large. Bigger glyphs have thicker strokes, so they survive lower contrast.
  • 7:1 — normal text (AAA). Required for the enhanced conformance level, and genuinely useful for text that people read for a long time.
  • 3:1 — user interface components (1.4.11). Icons, input borders, focus indicators and chart keys must meet this against what surrounds them. This is the criterion most teams forget: the text passes, and the input outline it sits in does not.

Fixing a failure without abandoning your palette

When a color fails, the usual instinct is to reach for a different one. Usually you do not need to: the tool walks your color towards black or white — whichever direction the background calls for — and returns the nearest shade that clears 4.5:1. The hue is preserved, so the result still belongs to your brand palette.

The preview above the numbers matters as much as the numbers. Contrast that technically passes can still be uncomfortable at small sizes on a dim screen, and text that clearly reads on your monitor may be unusable on a phone in sunlight.

Frequently asked questions

What ratio do I actually need?

4.5:1 for body text, 3:1 for large text (24px, or 18.66px bold) and 3:1 for interface components such as icons, input borders and focus rings. 7:1 meets the enhanced AAA level.

Why does a bright color fail when it looks obviously different?

Contrast is computed from relative luminance, not from how different two hues appear. Green contributes most of the luminance and blue almost none, so a vivid blue on black can fail while a duller green passes.

Do icons and borders need to pass too?

Yes. WCAG 1.4.11 requires 3:1 for non-text UI components against their surroundings. It is the criterion most often missed — the label passes and the input outline around it does not.

How is the suggested color chosen?

Your color is moved towards black or white, whichever direction the background requires, until it first clears 4.5:1. The hue is preserved, so the result still fits your palette.

Does large text really need less contrast?

Larger glyphs have thicker strokes, so they stay legible at a lower ratio. That is why WCAG sets 3:1 for large text rather than 4.5:1.

Have a suggestion for WCAG Contrast Checker?Share your feedback ↗