Colour Contrast Checker

Enter a text colour and a background colour to see the contrast ratio and whether the pair passes WCAG 2.2 AA and AAA.

15.82 to 1. Passes AA for normal text.

Contrast ratio

15.82:1

Text sizeAAAAA
Normal textPassPass
Large text (24px, or 18.66px bold)PassPass
UI components and graphicsPassn/a

Preview

Normal text looks like this. The quick brown fox jumps over the lazy dog.

Large text looks like this

UI component

What does the contrast ratio mean?

The contrast ratio is a number from 1:1 to 21:1 that says how far apart two colours are in brightness. Identical colours score 1:1, and black on white scores 21:1.

The checker works it out from the relative luminance of each colour, which is a measure of how light the colour appears. A higher ratio means the text stands out more from its background, so more people can read it comfortably. That includes people with low vision, and anyone reading a phone in bright sunlight.

WCAG 2.2 contrast requirements

WCAG 2.2 sets a minimum ratio for each kind of content, and the table below lists all five. Large text is at least 18 point (24px) in a regular weight, or 14 point (about 18.66px) in bold.

Minimum contrast ratios in WCAG 2.2
LevelContentMinimum ratioSuccess criterion
AANormal text4.5:11.4.3 Contrast (Minimum)
AALarge text3:11.4.3 Contrast (Minimum)
AAANormal text7:11.4.6 Contrast (Enhanced)
AAALarge text4.5:11.4.6 Contrast (Enhanced)
AAUI components and graphical objects3:11.4.11 Non-text Contrast

Three things are exempt: logos and brand names, text that is purely decorative or incidental, and text in inactive (disabled) interface components.

How to fix a failing colour pair

Darken the text or lighten the background until the ratio reaches the threshold. You can also do the reverse on a dark design. The checker suggests nearby shades that pass, so you can apply one and keep the look close to your original. Small changes often work: a slightly darker grey is usually enough to turn a fail into a pass.

Test the less obvious spots too. Placeholder text in form fields is often pale grey, and text placed over an image needs enough contrast against the part of the image behind it. A pass on one pair says nothing about the rest of the page, so check each combination you use.

Colour should never carry meaning alone. If an error shows only as red text, add an icon or a written message, so people who cannot tell the colours apart still get the point.

When to get help

A single failing pair is quick to fix. If many colours across your site fail, or you are planning a new design, it is easier to set accessible colours at the start than to correct them page by page. If you would like a second pair of eyes on a design, we can help.

Frequently asked questions

What is a good colour contrast ratio?

For normal text, 4.5:1 meets WCAG 2.2 level AA and 7:1 meets level AAA. Large text needs 3:1 for AA and 4.5:1 for AAA. Aim for AA as the minimum on every page, and go higher where you can.

What counts as large text?

Large text is at least 18 point (24px) in a regular weight, or at least 14 point (about 18.66px) in bold. Anything smaller counts as normal text and needs the higher ratio.

Did WCAG 2.2 change the contrast rules?

No. WCAG 2.2 uses the same contrast thresholds as WCAG 2.1, so a pair that passed before still passes.

What about APCA and WCAG 3?

APCA is a contrast method proposed for WCAG 3, which is still a draft. This tool uses the WCAG 2.2 ratio, which is the current standard.

Does it check transparent colours?

Yes. The checker blends a transparent text colour over the background before it calculates the ratio. A transparent background is blended over white first.

Is this the same as a color contrast checker?

Yes. A color contrast checker is the US spelling of a colour contrast checker, and both names describe the same tool. It tests the same WCAG 2.2 ratios whichever spelling you search for.

Building a new website?

We design and build websites for small businesses, with colour contrast checked against WCAG 2.2 as part of the design.

See our web design service