← All toolsDesign

Contrast checker

How to check color contrast

  1. Choose the text colour and the background colour.
  2. Look at the sample text to see how the combination looks.
  3. Read the contrast ratio and the pass or fail result for each WCAG level, then copy the result if you need it for documentation.

What the WCAG levels mean

The Web Content Accessibility Guidelines (WCAG) define minimum contrast so that text can be read by people with low vision or colour vision deficiencies, and by everyone on a bright phone screen outdoors.

Icons, form borders and other important graphics should have at least 3 : 1 against their surroundings.

How the ratio is calculated

Each colour is converted to its relative luminance, a measure of perceived brightness defined in WCAG 2. The ratio is (lighter + 0.05) ÷ (darker + 0.05) and ranges from 1 : 1 (identical colours) to 21 : 1 (black on white).

Tips for better contrast

Frequently asked questions

Does passing AA make my website accessible?

Contrast is one important requirement among many. Keyboard navigation, alternative text for images and clear structure matter too.

Where do I get the colour codes?

Use the eyedropper in the colour fields or in the Color picker, or copy the HEX values from your design file or CSS.