100% free no uploads no sign-up

color contrast checker

Enter a text colour and a background colour to see their WCAG contrast ratio and whether they pass AA and AAA. If they don't, the checker suggests the closest colour that does. Type hex, rgb(), hsl() or a colour name.

14.67:1excellent

Large text sample

Body text at normal size. The quick brown fox jumps over the lazy dog, 0123456789.

button outline
passAA normal textneeds 4.5:1
passAA large textneeds 3:1
passAAA normal textneeds 7:1
passAAA large textneeds 4.5:1
passUI parts & iconsneeds 3:1

WCAG contrast rules at a glance

WhatLevel AALevel AAA
Normal text4.5:17:1
Large text (24px+, or 18.66px+ bold)3:14.5:1
Icons, input borders, focus rings, chart lines3:1—
Logos and purely decorative textno requirement

Most accessibility laws and procurement rules, such as the European Accessibility Act and the US Section 508 standard, point to WCAG level AA, so 4.5:1 for body text is the number to aim for.

Real examples

Text on backgroundRatioAA textNote
#767676 on #FFFFFF4.54:1passthe lightest gray that passes AA on white
#777777 on #FFFFFF4.47:1large onlyone step lighter, which fails
#FFFFFF on #0000FF8.59:1passwhite on pure blue
#FFFFFF on #FF00003.99:1large onlywhite on pure red
#000000 on #FFFF0019.55:1passblack on yellow
#FFFFFF on #0080005.13:1passwhite on CSS green

Tips for readable colours

Frequently asked questions

What contrast ratio do I need?

WCAG 2 level AA needs at least 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold, and above). Level AAA needs 7:1 for normal text and 4.5:1 for large text. Icons, form borders and other interface parts need 3:1 against what's next to them.

How is the contrast ratio calculated?

Each colour's relative luminance is worked out from its sRGB values, with the gamma curve removed. The ratio is (lighter + 0.05) ÷ (darker + 0.05), so it runs from 1:1 (same colour) to 21:1 (black on white).

Why does the tool round the ratio down?

WCAG compares the exact ratio with the threshold. A ratio of 4.499:1 fails AA even though it would round up to 4.5, so the ratio is shown rounded down to two decimals to avoid a false pass.

What does the suggested colour do?

If your pair fails AA, the tool keeps the hue and saturation of your colour and changes only its lightness, by the smallest amount needed to reach 4.5:1. Click it to apply it.

Does it check transparent colours or images?

No. It compares two solid colours. For text over a photo or gradient, check the lightest and darkest parts of the background behind the text.

Is this the same as APCA?

No. APCA is a newer contrast method being explored for future guidelines. This checker uses the WCAG 2.x formula, which is what accessibility laws and audits refer to today.

More colour tools