ColorGuard - free, no upload, runs in your browser

Color contrast checker for WCAG AA and AAA

ColorGuard computes the contrast ratio between a text color and its background, checks it against WCAG 2.x AA and AAA thresholds for normal and large text, and suggests a compliant nearby color when the pair fails. Runs locally, instant results.

What the WCAG thresholds mean in practice

WCAG 2.x sets 4.5:1 as the minimum contrast for normal-size body text (AA) and 7:1 for the stricter AAA level. Text at least 18.66 px bold or 24 px regular counts as large and needs only 3:1.

These are not stylistic opinions - low contrast is one of the most commonly flagged accessibility failures and one of the easiest to fix before launch.

The failures that show up again and again

Gray-on-gray text in modern UI themes, brand colors chosen for vibrancy rather than legibility, and white text on brand-tinted buttons are the three classics. Each looks fine on a designer's calibrated monitor and fails for everyone else.

ColorGuard names the problem immediately: the ratio, the failing threshold, and the closest compliant color you can swap in.

How to check a color pair

Contrast is not the same as readability

A pair can pass 4.5:1 and still be hard to read because the font is thin, small, or set in a light weight over a busy background. Contrast is the measurable floor, not the whole experience. Check the actual size and weight you ship, not the ideal design token.

Non-text elements matter too. Focus rings, button borders, toggle states, chart lines, and icons all need enough contrast against their surroundings. WCAG 2.2 asks for at least 3:1 for most non-text UI components and graphical objects that carry meaning.

A five-minute accessibility pass

Frequently asked questions

What is the difference between AA and AAA?

AA (4.5:1 for normal text) is the legal-ish baseline most policies reference. AAA (7:1) is the enhanced level recommended for content where readability is critical, such as long-form reading.

What counts as large text?

Text at least 24 px regular weight, or 18.66 px bold. Large text only needs a 3:1 ratio under WCAG.

Does it check contrast for images or gradients?

No. It evaluates solid color pairs, which covers text, buttons, badges, and backgrounds. For photos behind text, sample representative light and dark areas and check the worst case.

Can it fix a failing color for me?

Yes. When a pair fails, ColorGuard suggests a nearby compliant color you can apply with one click and re-verify.

Is the check done locally?

Yes. The ratio math runs in your browser; your color values are not sent anywhere.

Is 4.5:1 enough for all text?

No. 4.5:1 applies to normal text; large text can use 3:1, and non-text UI needs about 3:1. Check the size definition before you sign off.

Can I use color alone to show an error or status?

No. Add text, an icon, or another shape so people who cannot distinguish the colors still get the message.

Does it check color blindness simulation?

No. It checks contrast ratios, which is a different accessibility concern. Use a separate simulator to review how a palette reads with deuteranopia or protanopia.

Can I check a gradient?

A gradient has many color pairs. Check the lightest and darkest points where text or icons sit, not just the two endpoint colors.

What is a passing ratio for icons?

Most meaningful non-text graphics need about 3:1 against the adjacent color. Decorative icons with no meaning are exempt.

Related local tools