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
- List the color pairs you use for text and background, including text on photos, buttons and colored boxes.
- 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.
- 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.
- Compare the result. Normal text needs 4.5 to 1 or higher. Large text needs 3 to 1 or higher.
- 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.
- If a pair fails, darken the text or lighten the background until it passes. Changing the text color is usually the quickest fix.
- 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.
Related guides
The same task in other applications
- Check color contrast in a PDF (Acrobat cannot measure it)
- Choose a table style with good contrast in Excel
- Show negative numbers without relying on red in Excel
- Choose readable text size and contrast in PowerPoint
- Check and fix text contrast in Word
More for General
- Offer an accessible alternate format when a file cannot be fixed
- Avoid using color as the only signal
- Give a complex image a long description or accessible alternate
- Decide whether an image is decorative
- Describe a chart or graph: alt text plus a data table
- Why every document needs a title and a language