Skip to content

How to check colour contrast on your own pages

Last checked 2 December 2026

Run the check on the colours you've actually used, not the ones you meant to use. Two free routes work well: an online checker, and the tools built into your browser.

A contrast check from start to finishPick the text and its backgroundRun a checker or browser toolRead the ratio and the verdictAdjust a colour and test again
Check, read the result, fix, then check again.

Option 1: an online checker

A contrast checker takes two colours and gives you a ratio. The MDN documentation names WebAIM's Color Contrast Checker as one such tool.1

  1. Find the text colour in your site's settings or stylesheet. It's usually a short hex code, a six-character code that starts with a hash sign.
  2. Find the background colour behind that text. Some site builders show it in a colour picker, so copy the code from there.
  3. Enter both into the checker.
  4. Read the ratio, then compare it with the minimum for that kind of text. For normal body text, that's at least 4.5:1.1

This route suits you if you don't want to open developer tools. It only tests the two colours you type in, so it won't notice a third colour somewhere else on the page.

Option 2: Chrome's developer tools

  1. Open DevTools on your page.2
  2. Open the Lighthouse tab, and set the category to Accessibility.2
  3. Generate the report with the settings shown, then click Analyze page load and wait for the report.2
  4. Go to the contrast section of the report and click an affected element in the list.2

Menus and labels change between browser versions, so follow the vendor's page if yours looks different.

Option 3: Firefox's Accessibility Inspector

Firefox's Accessibility tools can check for issues with visual contrast.3 A warning symbol shows when contrast fails to meet the acceptable ratio.3

Reading the result

  • Pass. The ratio meets or beats the minimum for that text. You're done with that colour pair.
  • Fail. The ratio is below the minimum. Darken the text or lighten the background, then check again.
  • Near miss. Treat it as a fail. A ratio can't be rounded up to 4.5:1.4
  • Large text. It has a lower minimum than body text. Check which rule applies on the ratio explainer.

Where to look

Check more than your main paragraph.

  • Link colour against the page background.
  • Text inside buttons.
  • Small print, such as footers and captions.
  • Text laid over a picture. Test the area where contrast is lowest.4
  • Hover and focus states, if your site has them.

A tool can only measure what it can see. It won't tell you whether a font feels comfortable, so look at the page yourself as well.

Keep a record

  • Write down each pair you tested, with its ratio. A short note is enough.
  • Re-test after any colour change.
  • Re-test when you add a new page template, a banner or a promotional box.

Fewer colours means fewer pairs. A simple palette makes the whole job shorter, because you only have a handful of pairs to test and each one is easy to name.

If a result confuses you, run the same pair through a second tool. A pair that's close to the minimum but under it is still a fail.4 When in doubt, darken the text.

Where the facts come from

  1. Color contrast, MDN Web Docs
  2. Make your website easier to read, Chrome for Developers
  3. Accessibility Inspector, Firefox Source Docs
  4. Understanding WCAG 2 Contrast and Color Requirements, WebAIM