Skip to content
JustTools

Color Contrast Checker

Is your text readable? Check the contrast, fix it in one click, and test your whole palette.

Runs in your browser Free · no sign-up

At a glance

  • Calculates the WCAG 2 contrast ratio and checks AA and AAA for normal and large text, plus 3:1 for icons, borders and controls (1.4.11).
  • Make it pass: finds the nearest text or background colour that reaches AA or AAA — same hue, only lightness changes — and applies it in one click.
  • Accepts any CSS colour: hex (with alpha), rgb(), hsl(), oklch(), lab() and names. Translucent colours are measured as they appear.
  • A live preview of headings, body text, links, a button and an input border in your colours.
  • Shows the pair with protanopia, deuteranopia, tritanopia and achromatopsia, using the Machado (2009) model.
  • Palette grid: up to 12 colours, every one as text on every other, graded AAA / AA / large-only. Share a pair with a link.

Step by step

How to check colour contrast

  1. 1

    Enter the text colour

    Type any CSS colour or use the colour picker.

  2. 2

    Enter the background

    The colour behind the text.

  3. 3

    Read the result

    The ratio and which WCAG levels pass for normal text, large text and controls.

  4. 4

    Fix it

    If it fails, use a suggested text or background colour, or drag the lightness slider.

Features

Everything you need, nothing you don’t

AA and AAA

Normal text, large text and UI parts.

One-click fixes

Nearest passing colour, same hue.

Any CSS colour

Hex, rgb, hsl, oklch and names.

Live preview

Text, link, button and border.

Colour blindness

Four types of colour vision.

Palette grid

Every pair in your palette.

WCAG contrast requirements

The ratio compares the relative luminance of the two colours, from 1:1 (the same) to 21:1 (black on white). Ratios are not rounded up: 4.49:1 fails AA. Logos, disabled controls and decorative text are exempt.

WhatAAAAA
Normal text4.5:17:1
Large text (24px, or 18.66px bold)3:14.5:1
Icons, borders, focus rings, chart lines3:1—

Why only lightness changes

Contrast depends almost entirely on how light or dark the colours are. The suggestions keep your colour’s hue and adjust its lightness in the OKLCH colour space, so your blue stays blue — just darker or lighter — and the fix is as small as possible.

FAQ

Frequently asked questions

What contrast ratio do I need?

At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA, which most accessibility laws refer to. AAA asks for 7:1 and 4.5:1.

Is grey text on white accessible?

Only if it is dark enough. #767676 on white is 4.54:1 and passes AA; #777777 is 4.48:1 and fails.

Does this use APCA?

No. It uses the WCAG 2 formula, which current laws and audits are based on. APCA is still a draft for a future version of WCAG.

How are transparent colours handled?

Text with transparency is blended over the background, and a transparent background is blended over white, so the ratio matches what people see.

Can I check colours in OKLCH or by name?

Yes — anything your browser understands as a CSS colour, such as oklch(55% 0.15 250), lab(…) or rebeccapurple.

Why does the colour-blind preview show the same ratio?

Colour-vision deficiencies change hue far more than lightness, so the ratio barely moves. That is why lightness contrast — not colour — is what keeps text readable.

Keep going

Browse every tool

Last updated Report a problem or suggest a feature