Skip to content
Conyso.
Free tools · Design

Color contrast checker.

Enter a foreground and a background color and see the exact WCAG contrast ratio, with instant AA and AAA pass or fail for normal and large text. A live preview shows real headings and body copy in your two colors, so you read the result and see it at once.

Both a picker and a hex box for each color, kept in sync. Ratios run from 1:1 (identical) to 21:1 (black on white).

— contrast ratio
AA normal — AA large — AAA normal — AAA large —

Large heading text

Normal body text at 16px, the kind of paragraph a reader actually spends time with. If this is a strain to read, the ratio will say so.

Enter two colors to check.
What contrast does not test Contrast ratio is necessary but not sufficient: it does not test color-blind distinguishability, and color must never be the only way meaning is conveyed. Two colors can pass the ratio and still be hard to tell apart, so pair color with text, shape, or an icon.
Charts your whole audience can read.

Lens builds accessible, on-brand data visuals in the browser, deterministic and free, no build step.

Open in Lens ↗

How it works

The method.

Contrast ratio compares how much light each color reflects. Each color is turned into a relative luminance, a single number for its brightness that weights green most and blue least, matching how the eye responds.

The ratio is then the lighter luminance plus 0.05, divided by the darker luminance plus 0.05. The small offset keeps the ratio finite for pure black. The result runs from 1:1 for two identical colors to 21:1 for black on white.

WCAG sets thresholds against that ratio: 4.5:1 for normal text and 3:1 for large text at AA, and 7:1 and 4.5:1 at AAA. Bigger text gets an easier target because larger shapes are simpler to read.

Aa21:1Aa1.6:1pass vs fail
Same background, different text: one reads, one does not.

The formula

The maths, in the open.

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

Relative luminance L = 0.2126·R + 0.7152·G + 0.0722·B, where each channel is first scaled to 0 to 1 and linearized: c = v/12.92 for v ≤ 0.03928, otherwise c = ((v + 0.055) / 1.055)^2.4.

Worked example. Black #000000 on white #FFFFFF gives the maximum 21:1. Grey #767676 on white #FFFFFF gives about 4.54:1: it passes AA normal (needs 4.5) but fails AAA normal (needs 7).


Watch out

Common pitfalls.

A passing ratio is not the whole story. It says nothing about color blindness, so two colors that pass can still be indistinguishable to some readers. Contrast also ignores context: text over a photo or a gradient has no single background, so pick the worst-case region. And a very high ratio, like pure black on pure white, can feel harsh, so many designers use a near-black instead while staying well above the threshold.


FAQ

Contrast, answered.

What is a good color contrast ratio?

WCAG asks for at least 4.5:1 for normal body text and 3:1 for large text at AA. For the stricter AAA level, aim for 7:1 normal and 4.5:1 large. The maximum possible ratio is 21:1, black on white.

How is the WCAG contrast ratio calculated?

It compares the relative luminance of the two colors: ratio = (lighter luminance + 0.05) divided by (darker luminance + 0.05). Luminance is a weighted sum of the linearized red, green, and blue channels.

What counts as large text for WCAG?

Large text is at least 18pt, or 14pt when bold, which is roughly 24px, or 18.66px bold. Large text has a lower contrast requirement because bigger shapes are easier to read.

Does contrast ratio cover color blindness?

No. Contrast ratio measures lightness difference only. Two colors can pass contrast yet still be hard to tell apart for someone with color blindness, so never rely on color alone to convey meaning.

What is the difference between AA and AAA?

AA is the common legal and practical target: 4.5:1 for normal text, 3:1 for large. AAA is a stricter goal for maximum readability: 7:1 normal, 4.5:1 large.

Is this checker free?

Yes, free and no signup, running entirely in your browser.



Embed this checker

Put it on your site, free.

A clean, responsive widget that runs in your visitor's browser, no signup. Pick an accent to match your brand, then copy the snippet. The Conyso mark stays on the widget.

Accent
Powered by Conyso.