Contrast Checker

Check if your text is easy to read on its background. Pick two colors and a font size to see the WCAG contrast ratio, which levels pass, and a nearby text color that fixes a failing pair.

Runs in your browser. Nothing you type is uploaded.

Your numbers

Result

Contrast ratio3.24:1

16px, counted as normal text: fails AA.

Text color
#8a8f98
Background
#ffffff
Needed for AA
4.5:1
Normal text
Needed for AAA
7:1
  • AA normal text (4.5:1): failBody copy, labels and links under 24px, or under 18.66px when bold.
  • AA large text (3:1): passText at 24px and up, or 18.66px and up when bold.
  • AAA normal text (7:1): failThe stricter level, worth it for long reading.
  • AAA large text (4.5:1): failThe stricter level for headings and large text.
  • Icons and input borders (3:1): passNon-text parts people need to see, such as icons and field outlines.
Closest passing text color (same hue, lightness changed)
color: #727780; /* 4.50:1 on #ffffff, passes AA for all text */
color: #555962; /* 7.01:1 on #ffffff, passes AAA for all text */

How it works

The ratio
Each color gets a relative luminance from its linear red, green and blue values, weighted 0.2126, 0.7152 and 0.0722. The ratio is (lighter + 0.05) divided by (darker + 0.05), from 1:1 up to 21:1.
The levels
WCAG 2 AA asks for 4.5:1 on normal text and 3:1 on large text. AAA asks for 7:1 and 4.5:1. Large means 24px and up, or about 18.66px and up when bold.
The suggestion
The tool keeps your hue and chroma in OKLCH and moves lightness step by step, lighter and darker, until the pair passes. It shows the option that needs the smaller change.

Questions

What contrast ratio do I need?

For most body text, at least 4.5:1 to meet WCAG AA. Headings at 24px and up, or bold text at about 18.66px and up, need 3:1. Aim for 7:1 if people read a lot of text on the page.

Why does the ratio show 4.49 when it looks like 4.5?

WCAG does not allow rounding up to pass. The tool cuts the value at two decimals instead of rounding, so a pair at 4.499 shows as 4.49 and fails.

Does this cover placeholder and disabled text?

Placeholder text should pass like normal text, since people read it. Disabled controls are exempt from the rule, but they still need to be clear enough to notice.

Get CapyLaunch Weekly

New indie launches and the week in AI tools and models, every Monday. Free, and you can unsubscribe anytime.

We send a confirm link first. Privacy

Your launch, this week. Free.

A reviewed listing, a permanent page with a link to your site, and feedback from makers who actually care.

Start my launch →or browse toolsFree to submit. Every listing is reviewed before it goes live.