Add to Chrome
Add to Chrome

Color contrast checker

Pick a text color and a background color to see their contrast ratio and whether they pass WCAG AA and AAA. When they fail, get the closest color that passes.

Big headline, 24 px

Body text at 16 pixels, the size most of a page is read in. If this is hard to read, so is your page.

ButtonSmall print, 13 px

How to check color contrast

  1. Enter the text color and the background color as HEX, RGB or HSL, or pick them with the color pickers.
  2. Read the ratio and the five checks: AA and AAA for normal text, AA and AAA for large text, and AA for buttons, icons and form borders.
  3. If a check fails, use the suggested color: the closest one, with the same hue, that passes.

WCAG contrast levels

CheckMinimum ratioApplies to
AA, normal text4.5 : 1Body text under 24 px (or under 18.66 px bold)
AA, large text3 : 1Text of 24 px and up, or 18.66 px bold and up
AAA, normal text7 : 1The stricter level for body text
AAA, large text4.5 : 1The stricter level for large text
AA, UI parts3 : 1Icons, input borders and focus rings

Checking contrast on a real page

Text often sits on a gradient, a photo or a see-through layer, which makes its real background hard to know. The Design Toolkit inspector shows the contrast of any text against what is really behind it, with its WCAG level, when you hover it on the live page.

Check contrast on any live page. Hover any text with the Design Toolkit inspector to see its contrast against its real background, with the WCAG level. How it works

Questions

What is a good contrast ratio?

At least 4.5 : 1 for normal text and 3 : 1 for large text meets WCAG AA. 7 : 1 for normal text meets the stricter AAA level.

What counts as large text?

Text of 24 pixels and up, or bold text of about 18.66 pixels and up.

How do I fix a color that fails?

Use the suggested color. It keeps the same hue and changes only the lightness, just enough to pass.

Do buttons and icons need contrast too?

Yes. WCAG asks for 3 : 1 for the parts people need to see to use a page, such as icons, input borders and focus rings.

Stop guessing. Get the exact design of any website.

Hover for the real CSS, pull its colors into Figma, or give your AI the code of a whole section.

Add to Chrome
No accountRuns locally14-day refund