Color Contrast Checker

Enter a text colour and a background colour to get their contrast ratio and whether they pass the WCAG 2 accessibility guidelines for normal text, large text and icons. A live preview shows how they look together. If a combination fails, the tool suggests the closest text colour that passes, keeping the same hue.

Opacity is allowed, e.g. #00000099

Normal text at 16 px. Most paragraphs, labels and form hints are this size.

Large text at 24 px

Outlined button

Contrast ratio

7.55:1

Normal text AA: Pass

Needs 4.5:1

Normal text AAA: Pass

Needs 7:1

Large text AA: Pass

24 px, or 18.66 px bold. Needs 3:1

Large text AAA: Pass

Needs 4.5:1

Icons and borders: Pass

UI parts and focus rings need 3:1

Checking runs in your browser. What you type never leaves this device.

Features

  • Contrast ratio from 1:1 to 21:1, calculated with the WCAG 2 formula

  • Pass or fail for AA and AAA, normal and large text, and for icons and borders (3:1)

  • Live preview with body text, a large heading, a button outline and an icon

  • One click to use the nearest passing colour for AA or AAA

  • Translucent text is blended over the background first, as the browser draws it

  • Swap button to test light text on dark backgrounds

When to check contrast

Websites and apps

Grey text on white, white text on brand colours and placeholder text are the most common accessibility failures. Check them before launch.

Government and public sector work

Many tenders and public websites follow WCAG 2.1 AA (India's GIGW guidelines are based on it), which needs 4.5:1 for normal text.

Posters, slides and social posts

Text on coloured backgrounds that is hard to read on a projector or a phone in sunlight usually has low contrast.

Understanding contrast ratios

The thresholds

  • Normal text, AA: at least 4.5:1. This is the level most guidelines and audits ask for.
  • Normal text, AAA: at least 7:1, for the best readability.
  • Large text (24 px and up, or bold 18.66 px and up): 3:1 for AA and 4.5:1 for AAA.
  • Icons, input borders and focus rings that people need to see: 3:1.

Why 4.48:1 fails

WCAG compares the exact ratio with the threshold, without rounding. A ratio of 4.48:1 is shown as 4.48:1 here and fails AA, even though some tools round it up to 4.5. The ratio is shown cut off, not rounded up, so a pass here is a real pass.

How the suggestions work

When a pair fails, the tool keeps your text colour's hue and colourfulness and moves only its lightness, darker or lighter, by the smallest step that reaches 4.5:1 or 7:1. Your design changes as little as possible. If no lightness of that hue can reach the target on your background, change the background instead.

Related tools

Color Contrast Checker - FAQ