Free migrationUK web hosting from £2.99 a month, with backups every six hours and a 60-day money-back guarantee.UK web hosting from £2.99 a month.See hosting plans
AccessibilityFreeNo sign-upPrivate

Colour contrast checker

Pale grey text, a white button label on bright orange, a footer you have to squint at: check any colour pair before it goes on your website. Enter two hex codes and you'll see the contrast ratio and whether it passes WCAG.

Your answers stay in this browser and are never sent to us.

Your answers
Readable text should remain comfortable at this size.

Your result

Fill in the form to begin

Your result appears here straight away. Nothing is uploaded or saved.

How the result is worked out

How the contrast ratio is worked out

The checker works out how bright each colour is using the WCAG relative luminance formula. It then divides the lighter colour by the darker one (each plus 0.05) to get a ratio between 1:1 and 21:1. That ratio is compared with four WCAG thresholds: 4.5:1 for normal text and 3:1 for large text at AA, and 7:1 and 4.5:1 at AAA.

How do I check if the colours on my website are readable?

Find the hex code for your text colour and the colour behind it, then enter both into the checker. A hex code is a # followed by six letters and numbers, such as #06162d. You’ll get a contrast ratio and four pass or fail results. For most small business websites, the one that matters is normal text AA: 4.5:1 or higher.

If you’re not sure where to find the hex codes, our guide to colour contrast for websites shows how to read them from your site in Chrome, Edge or Firefox, with worked examples of colours that pass and fail.

Reading the four results

  • Normal text AA (4.5:1). The main one. It covers body text, menus, prices, opening hours and most buttons.
  • Large text AA (3:1). Only for text that’s at least 24px, or about 18.7px bold. Big headings usually qualify. Your phone number in the header probably doesn’t.
  • Normal text AAA (7:1) and large text AAA (4.5:1). Stricter levels. Worth reaching for on long passages of text, but not expected everywhere.

A pair that fails large text AA is too faint for anything people need to read.

Which colour pairs to check first

Most sites only use a handful of colour pairs, so you can check the lot in ten minutes. Start with:

  1. Your main body text on the page background.
  2. Button text on the button colour, such as “Get a quote” or “Book now”.
  3. Links in the middle of a paragraph.
  4. Text in coloured banners, like “Free quotes across Shropshire”.
  5. Footer text, where your address and phone number usually sit.

Say a roofer in Oswestry has white text on a yellow banner. That’s a pair worth testing, because white on light, bright colours often fails.

What to do if a pair fails

Keep the colour family and change how light or dark it is. Darken the text, or darken the button. Use the hex box to nudge the colour a little at a time and press check again until it passes. Your brand colour can still be used for backgrounds, borders and icons where there’s no small text on top.

Colours the checker can’t see

The checker compares two flat colours. Text over a photo changes from one part of the image to the next, so test the lightest part of the photo behind the words. Also check hover colours, placeholder text in forms and anything that changes colour when it’s selected.

On our £47 a month managed website, we measure contrast on every page before it goes live.

Common questions

Questions about this tool

What contrast ratio does my website text need?

At least 4.5:1 for normal text and 3:1 for large text. That’s WCAG level AA, which is the usual target. The stricter AAA level asks for 7:1 and 4.5:1.

What counts as large text?

At least 24px for regular text, or about 18.7px if it’s bold. Body text, menus and most button labels are smaller than that, so they need 4.5:1.

Does the text on my buttons need to pass too?

Yes. Button text needs 4.5:1 against the button colour, not the page behind it. WCAG also asks for 3:1 for things like form field edges and icons that carry meaning.

Is anything I enter saved or sent anywhere?

No. The check runs in your browser using the two hex codes you type. Nothing is uploaded or stored.

Get your business website for £47 a month.

We design it, write it, host it and make your changes. No setup fee, no contract, and your first draft commonly the same day.

Open in new tab