Converters & Dev

Colour Contrast Checker

Put in a text colour and a background colour to get the contrast ratio, whether it passes WCAG AA and AAA, and a preview at real text sizes.

The two colours

Large text, 24px bold

Body text at 14px — the size most of a page is set in, and the one that decides whether people can read you.

Button or border

Contrast

Ratio—
Normal text (AA needs 4.5)
—
Normal text (AAA needs 7)
—
Large text, 18.66px bold or 24px (AA needs 3)
—
Icons, borders and controls (needs 3)
—
Text luminance / background
—

What the contrast ratio measures

The ratio compares the relative brightness of two colours, from 1:1 (identical) to 21:1 (black on white). It is the single number accessibility rules are built on, because it predicts quite well who can read a piece of text — including people with low vision, older eyes, or a phone in bright sunlight.

The thresholds

How to use the checker

  1. Type or pick the two colours. Hex, short hex and rgb() are all accepted.
  2. Read the ratio and the four badges underneath — the preview shows the same pair at real sizes.
  3. Press "Fix the text colour" to have the text colour moved just far enough to reach 4.5:1.

Where sites usually fail

Beyond the ratio

Passing the number is the floor, not the goal. Thin fonts at small sizes are hard to read even at 7:1, and pure black on pure white can feel harsh. Check your choices on a real phone outdoors — the test no formula replaces.

Frequently asked questions

What contrast ratio do I need?

4.5:1 for normal text and 3:1 for large text or interface elements to meet WCAG AA. AAA asks for 7:1 and 4.5:1 respectively.

What counts as large text?

24px and above, or 18.66px and above if it is bold. Below that, the 4.5:1 rule applies.

Does the rule apply to disabled buttons and logos?

No. Disabled controls and logotypes are exempt under WCAG, though making them readable anyway is usually the better choice.