Home › Developer & Design › Color Contrast Checker

Color Contrast Checker

See whether your text colour is readable on its background.

Large sample heading

This is how normal sized text looks with these colours.

How to check two colours

  1. Enter hex codes or use the colour pickers.
  2. Look at the sample text.
  3. Read the ratio and the pass or fail results.

Understanding the ratio

The ratio runs from 1:1, for identical colours, to 21:1 for black on white. It uses the relative brightness of the colours as defined in the Web Content Accessibility Guidelines (WCAG).

Minimum ratios

LevelNormal textLarge text
AA4.5:13:1
AAA7:14.5:1

Large text generally means at least 18 point (about 24 pixels), or 14 point (about 18.7 pixels) when bold. The tool rounds the displayed ratio down, so a borderline pair is not shown as higher than it is.

Improving a weak pair

Darken the darker colour or lighten the lighter one. Changing only the hue often has little effect. Light grey text on white is a frequent problem.

Beyond the numbers

  • Check links, buttons, placeholder text and disabled states.
  • Do not use colour alone to show errors or status.
  • Test text over photographs at its weakest point.
  • Try the design on a phone in bright light.

Example

Black on white gives the maximum 21:1. A mid grey such as #777777 on white is just under 4.5:1, so it fails Level AA for normal text although it passes for large text. Darkening it slightly to #767676 reaches the AA threshold. Small differences like this are why measuring is more dependable than judging by eye.

Frequently Asked Questions

Does passing make a website accessible?

No. Contrast is one requirement among many.

Can I enter short codes?

Yes. #fff is read as #ffffff. Transparent colours are not supported.