TurantToolsdev</> All tools

// free · runs in your browser · nothing uploaded

Colour Contrast Checker

Check if your text and background colours pass WCAG 2.2 AA and AAA, get the closest colour that passes, convert between HEX, RGB and HSL, and make a 50–900 shade scale.

1. Your colours

Contrast ratio

4.83:1

Good

  • Normal text · AA (4.5:1)PASS
  • Large text · AA (3:1)PASS
  • Normal text · AAA (7:1)FAIL
  • Large text · AAA (4.5:1)PASS
  • Buttons, icons, borders (3:1)PASS

Normal text: the quick brown fox jumps over the lazy dog.

Large text (24 px or 19 px bold)

Button

Closest text colours that pass

2. Colour codes (tap to copy)

Text
Background

Shades of the text colour (tap to copy)

Contrast is worked out with the WCAG 2.2 formula. Large text means at least 24 px, or 18.66 px (14 pt) bold. Ratios are rounded down so a near miss never shows as a pass.

💬 Share this tool

📚 Official sources: WCAG 2.2

We build every tool from the official rules and re-check them when they change. Always confirm with the official source before you rely on a result.

🛠️ Spotted a mistake or an out-of-date rule? Tell us

How it works

Each colour's relative luminance is worked out the WCAG way: the red, green and blue values are converted from sRGB to linear light and weighted 21%, 72% and 7%, because eyes are most sensitive to green. The contrast ratio is (lighter + 0.05) ÷ (darker + 0.05), from 1:1 to 21:1. The ratio is shown rounded down, so a near miss never looks like a pass.

Example: grey text #8a8f98 on white

CheckNeedsResult
Normal text, AA4.5:1Fail
Large text, AA3:1Pass
Buttons and icons3:1Pass
Ratio 3.24:1.

Keeping the same hue and saturation and only darkening, the nearest colour that passes AA for body text is #717780.

Good to know

Guides

Related tools

Questions people ask

What contrast ratio do I need?+

WCAG 2.2 level AA needs at least 4.5:1 for normal text and 3:1 for large text (24 px, or 18.66 px bold) and for buttons, icons and input borders. Level AAA needs 7:1 for normal text and 4.5:1 for large text.

Is AA enough?+

AA is the level most accessibility laws and policies ask for, including the European Accessibility Act, the ADA guidance in the US and most government websites. AAA is stricter and recommended for long reading text.

How does the tool suggest a fix?+

It keeps the hue and saturation of your text colour and only makes it darker or lighter, step by step, until it reaches the ratio you need. It picks the smallest change so your design still looks the same.

Why is #777777 on white a fail?+

Its ratio is 4.479:1, just under 4.5:1. WCAG says not to round up, so it fails AA for normal text. #767676 is the lightest grey that passes on white.

Colours

More free tools