Free interactive tool

Check whether two colours have enough contrast

Pick a text colour and a background colour. The tool shows their contrast ratio, and whether it passes WCAG AA (4.5:1) and AAA (7:1) for body text. If it fails, the tool suggests a lighter or darker version of your text colour that passes. If there isn't one, it says so and offers black or white, with the ratio it reaches.

How-To Guide

How to check a text colour against its background

The tool checks one pair at a time: the colour of your text and the colour behind it. If you are choosing colours for a brand or an interface, check each pair you plan to use.

Level: Beginner
Best for: Designers building accessible colour systems
  1. Choose your two colours

    Pick a text colour and a background colour, or type their hex codes.

  2. Read the contrast results

    See the contrast ratio, and a pass or fail for AA and AAA. Both come from WCAG, the Web Content Accessibility Guidelines.

  3. Use a suggested colour

    If AA or AAA fails, you can apply the colour suggested for it, and the result updates.

True-Contrast Smart Palette

Pick a foreground (text) colour and a background colour below. You get the exact contrast ratio straight away, PASS or FAIL badges for WCAG AA and AAA, a live preview, and if either level fails, a fix that genuinely keeps the same hue wherever one exists at that lightness.

WCAG 2.1 defines two relevant thresholds for normal body text: AA needs a contrast ratio of at least 4.5:1, AAA needs at least 7:1. Larger text has lower thresholds, but this tool always checks the stricter body text targets.

Contrast ratio is calculated from the relative luminance of each colour, exactly as WCAG 2.1 publishes the formula. No colour is silently rounded away: an invalid hex shows a message right next to the field instead of freezing your last result.

Foreground (text) colour
Background colour

Result

Contrast ratio: -

AA (4.5:1): - AAA (7:1): -

The quick brown fox jumps over the lazy dog. This sample shows your chosen text colour on your chosen background.

Free Tools

Check the contrast of two colours

It checks a foreground and a background colour against WCAG contrast thresholds and shows where the pair fails. It takes solid colours only, so check text over a translucent colour, a gradient or a photograph on the finished page.

No account required · Free to use · Works in any browser