Related Reading

How to Check Color Contrast for Accessibility

Two color codes, one free tool, and two numbers to remember.

By Tim Slade · Updated November 2026 · 8 min read

Someone reviews your course and writes one line: "Does this pass contrast?" You look at the screen. The text seems readable to you. You don't know what "pass" means, or how anyone would measure it. It turns out to be one of the simplest checks in accessibility. To check color contrast, take the code for your text color and the code for the color behind it, enter both into a free contrast checker, and compare the ratio it gives you with two numbers: 4.5 to 1 for body text, and 3 to 1 for large text. This article shows you how, and what to do when a color fails.

What is color contrast?

Before you measure anything, it helps to know what the number means, because a contrast ratio looks more technical than it is.

Contrast is how different two colors are in lightness. A checker turns that difference into a ratio. Two identical colors score 1 to 1, which is no contrast at all. Black on white scores 21 to 1, which is the most there is. Everything else falls in between.

The higher the ratio, the easier the text is to read, for everyone. That includes people with low vision, people on an old laptop, and people reading on a tablet beside a sunny window.

The Contrast Scale

A contrast ratio runs from 1 to 1 up to 21 to 1. Text has to clear 4.5, or 3 when it's large.

What numbers do you need to pass?

A ratio only helps if you know where the line is. The line comes from the Web Content Accessibility Guidelines, published by the W3C, which is the standard most accessibility policies point to.

What you're checkingThe ratio it needs
Body text, and any other text that isn't largeAt least 4.5 to 1
Large text: 18 points or more, or 14 points and boldAt least 3 to 1
Buttons, and icons that mean somethingAt least 3 to 1 against the color beside them
Logos, disabled buttons, and pure decorationNo requirement

Two details catch people out.

Text inside an image counts. If you've typed a title onto a picture and saved it as an image, it still has to pass.

You can't round up. A result of 4.49 doesn't pass a 4.5 requirement. Close isn't a pass.

How do you check it, step by step?

You don't need to check every screen. You need to check every pairing, and there are far fewer of those. If you've made a style guide, you've already got the list.

  1. List your pairings. Write down every combination of text color and background color the course uses: body text on the background, the label on a button, a heading on a colored bar, a caption on a panel.
  2. Get the two color codes. These are the six-character codes, such as #2A2E33. You'll find them in your tool's color menu, or you can pick a color up with the eyedropper.
  3. Enter them into a contrast checker. One code goes in the text box, and the other goes in the background box. It doesn't matter which is which. The ratio is the same either way.
  4. Read the ratio, and compare it with the table above. Remember that the bar depends on the size of the text.
  5. Write the result on your style guide, next to the pairing. Then you never have to check it again.

For the checker itself, I'd start with one of two free tools.

ToolWhat it isGood for
WebAIM Contrast CheckerA web page. You type in two codes, and it shows the ratioChecking a palette before you build
Colour Contrast Analyser, from TPGiA free program you install. It can check documents and images as well as web pagesChecking a finished screen, when you don't have the codes

You can also try a palette on the page in How to Choose Colors for eLearning, where you can tap any two colors and see whether they pass.

What about text on a photo?

A checker compares two flat colors, and a photo isn't a flat color. This is where most contrast problems hide, because the text can pass over the dark part of the picture and fail over the bright part.

I wouldn't try to measure it. I'd change the design so there's something to measure.

  • Put a solid band or panel behind the text. Then check the text against the panel.
  • Or darken the whole photo with a dark overlay, and check the text against the lightest area that's left.
  • Or move the text off the photo. It's often the best-looking answer as well.

The same goes for gradients. Check the text against the end of the gradient where it has the least contrast.

What do you do when a color fails?

This is the question that matters, because a color will fail. Bright, friendly brand colors are the usual offenders. They're too light to be text on white, and often too light to carry white text as well.

You have four moves. Here they are with a bright green, #3FA652, on an off-white background.

MovePairingRatioResult
The starting pointBright green text on off-white2.8 to 1Fails
Flip itWhite text on bright green3.1 to 1Large text only
Use dark text on itCharcoal text on bright green4.4 to 1Large text only. It misses 4.5, and you can't round up
Darken the colorA darker green, #2A7D3C, on off-white4.7 to 1Passes
Stop using it for textBright green as a bar or a shape, with charcoal text on off-white beside it12.5 to 1Passes

The last move is the one I reach for most. A color that fails as text can still be all over your course as bars, shapes, and icons beside labels. You don't have to give it up. You have to give it a different job.

If the color belongs to a brand, don't quietly change it. Keep the brand color for shapes, and ask whether the brand has a darker version meant for text.

Try It

Which bar does it have to clear?

The number a thing has to reach depends on what it is. Sort each one.

What it is 1 of 11

  1. A “Next” arrow icon

What doesn't a contrast checker tell you?

A passing ratio is a floor. It tells you the two colors are far enough apart. It doesn't tell you the screen is easy to read.

  • Thin fonts look fainter than their color. A light-weight font can pass on paper and still look washed out. The guidelines themselves suggest a heavier font, or more contrast than the minimum.
  • Small text needs more help. I treat 4.5 to 1 as the least I'll accept for body text, and I aim well above it.
  • Screens differ. Publish one screen and look at it on the kind of device your learners use, in the kind of light they'll be in.
  • Color can't be the only signal. A red outline around a wrong answer may pass on contrast and still mean nothing to someone who can't tell red from green. Add a symbol and a word. I cover that in How to Design Buttons, Icons, and Feedback Screens.

Contrast is also only one part of accessibility. For the rest, see How to Make an eLearning Course Accessible and What Is Accessible eLearning?

Example

Mateo checks a tip box

Mateo's contractor has added a "Shop tip" box to several screens of the maintenance course. It's a bright green box with charcoal text at 14 points. It looks good, and it uses two colors from the style guide.

Mateo isn't sure about it, so he checks.

PairingRatioWhat it needsResult
Charcoal on bright green4.42 to 14.5 to 1, because it's 14-point body textFails
Off-white on deep green7.2 to 14.5 to 1Passes

It's a near miss, and a near miss is still a fail. He could make the text bold, which would bring it under the 3 to 1 rule. But a whole tip in bold is tiring to read.

So he changes the box. The tip boxes become deep green with off-white text, which is a pairing he'd already checked for his title bars. Then he adds a line to the style guide: "Bright green: shapes and bars only. Never behind body text."

The contractor didn't do anything wrong. The page hadn't told him.

Common questions about color contrast

What does "AA" mean?

It's a level in the accessibility guidelines. The 4.5 to 1 and 3 to 1 numbers in this article are both Level AA requirements. So when a reviewer asks whether your course "meets AA for contrast," these are the numbers they mean.

Does light text on a dark background follow the same rules?

Yes. The ratio is the same whichever color is the text and whichever is the background, so the same two numbers apply. On a dark screen, your colors usually have to be lighter than you'd expect in order to pass.

Can your authoring tool check contrast for you?

Some tools have an accessibility checker that flags low contrast. Treat it as a second pair of eyes. It can miss text on images and anything it can't measure, so I'd still check each pairing myself and write the results on the style guide.

Can AI check contrast?

I wouldn't ask a chatbot for the ratio. It's a calculation, and a contrast checker does it exactly, every time. AI is more useful one step later: when a color fails, ask it to suggest a few darker versions, and then test those in the checker.

The takeaway

To check color contrast, enter your text color and your background color into a free contrast checker, and compare the ratio with two numbers: 4.5 to 1 for body text, and 3 to 1 for large text, buttons, and icons. Check every pairing once, and write the results on your style guide. When a color fails, darken it, or give it a job that isn't text. Then look at the real screen, because passing is where readable starts.

Part of This Guide

Visual Design for eLearning

You don't need to draw. Learn the four choices behind every good-looking course, and build a one-page style guide as you go.

See All 8 Steps →
Tim Slade

About the Author

Tim Slade

Tim Slade has spent nearly two decades working in instructional design and helping new instructional designers grow their careers by focusing on skills first. He's the author of The Instructional Design Handbook. See the handbook