Free color contrast checker

Two colors in, the ratio out, and the nearest color that passes WCAG 2.2.

Check two colors

Book a class Evening sessions, Tuesday and Thursday. Book now

2.15:1Contrast ratio

Too faint for text of any size, and for icons and controls.

What this ratio passes under WCAG 2.2 AA
Where the colors are usedResult
Normal text needs 4.5:1 Fails
Large text 18 pt, or 14 pt bold, needs 3:1 Fails
Icons and controls needs 3:1 Fails

The stricter AAA level needs 7:1 for normal text and 4.5:1 for large text. This pair fails both.

Flat colors only. Text over a photo or a gradient, and text inside a logo, need a person.

The nearest colors that pass AA

  • Keep the text, change the background to #3878BF 4.55:1
  • Keep the background, change the text to #444444 4.52:1

This checks two colors. The free audit checks every color on a page, and nine other things, in about a minute.

What this check looks for

The tool above checks for these things on the page you give it.

Low contrast controls
Borders of inputs and buttons that are hard to see against the page.
Links shown by color alone
Links with no underline that differ from the surrounding text only by color.

The fix, in CSS

A booking button that fails at 2.15:1. Darkening its background is one line, and the white text stays.

CSS
/* Broken: fails at 2.15:1 */
.btn-booking {
  background: #8FB4DE;
  color: #fff;
}

/* Fixed: passes AA, 4.55:1 */
.btn-booking {
  background: #3878BF;
  color: #fff;
}

How it shows in AccessGuard

Each finding names the WCAG criterion, explains the problem in plain words and shows the element that fails, so a developer can find it on the page.

A color contrast finding in AccessGuard with its severity, WCAG criterion, description and the affected HTML element

WCAG criteria

Findings from this check name one of these criteria. How much of each the audit can decide on its own:

WCAG criteria covered by the color contrast check
Criterion Level Automation
1.4.3 Contrast (Minimum) Text on solid backgrounds is measured. Text over images and gradients needs a person. AA Partly automated
1.4.11 Non-text Contrast AA Partly automated
1.4.1 Use of Color Links that differ from text only by color are flagged. Other meaning carried by color needs a person. A Partly automated

What still needs a person

No automated tool can confirm these. AccessGuard marks related findings as Review, so nobody mistakes them for a pass.

  • Text placed over photos, videos or gradients, where the background changes behind the letters.
  • Whether information shown with color, such as a red error state, is also shown another way.
  • Text inside images and logos (logos are exempt).

Questions

What contrast ratio does WCAG 2.2 AA require?

4.5:1 for normal text and 3:1 for large text, which is at least 24px regular or 18.66px bold. Borders and icons that users need to see need 3:1 against what is next to them.

Does the check use the colors in the CSS or on the page?

It measures the colors the browser actually renders, after stylesheets, inherited colors and transparency are applied.

Why do contrast results sometimes need a person?

When text sits over an image or gradient, the background differs under each letter. AccessGuard marks those cases for review instead of guessing.

Every check, not only color contrast

The free audit runs this check and every other one. Results in about a minute.