Skip to main content

Check color contrast against WCAG AA (4.5:1 and 3:1)

General · All · Last updated

Part of training module 3: The ideas that apply everywhere: structure, text alternatives, colour

Contrast ratio measures how much lighter or darker text is than its background, and WCAG AA asks for at least 4.5 to 1 for normal text and 3 to 1 for large text.

Steps

  1. List the color pairs you use for text and background, including text on photos, buttons and colored boxes.
  2. Decide whether each text is normal or large. Large text is about 18 point and up, or about 14 point and up if it is bold. Everything smaller is normal.
  3. Measure each pair with a contrast checker. Enter the text color and the background color, usually as hex codes, and read the ratio it shows.
  4. Compare the result. Normal text needs 4.5 to 1 or higher. Large text needs 3 to 1 or higher.
  5. Check non-text parts that carry meaning, such as icons, chart lines and form field borders. These need at least 3 to 1 against what is next to them.
  6. If a pair fails, darken the text or lighten the background until it passes. Changing the text color is usually the quickest fix.
  7. Save passing pairs as your standard palette in your template, so people do not have to test them again. For Word, see Check and fix text contrast in Word.

Check it worked

  • Every text and background pair shows 4.5 to 1 or more, or 3 to 1 or more for large text.
  • Text over a picture is readable at every point, not only in the easiest spot.
  • The page is still readable when printed in grayscale.

Common mistakes

  • Judging by eye. A color that looks fine to you may fail for someone with low vision or a dim screen.
  • Using light gray text for small print or captions.
  • Forgetting hover and focus states, such as a link that changes color when selected. These also need enough contrast.
  • Trusting a checker for everything. Text over a photo has a different background at every point, so also check it by eye at its busiest spot.

The same task in other applications

More for General