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
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 checking | The ratio it needs |
|---|---|
| Body text, and any other text that isn't large | At least 4.5 to 1 |
| Large text: 18 points or more, or 14 points and bold | At least 3 to 1 |
| Buttons, and icons that mean something | At least 3 to 1 against the color beside them |
| Logos, disabled buttons, and pure decoration | No 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.
- 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.
- 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.
- 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.
- Read the ratio, and compare it with the table above. Remember that the bar depends on the size of the text.
- 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.
| Tool | What it is | Good for |
|---|---|---|
| WebAIM Contrast Checker | A web page. You type in two codes, and it shows the ratio | Checking a palette before you build |
| Colour Contrast Analyser, from TPGi | A free program you install. It can check documents and images as well as web pages | Checking 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.
| Move | Pairing | Ratio | Result |
|---|---|---|---|
| The starting point | Bright green text on off-white | 2.8 to 1 | Fails |
| Flip it | White text on bright green | 3.1 to 1 | Large text only |
| Use dark text on it | Charcoal text on bright green | 4.4 to 1 | Large text only. It misses 4.5, and you can't round up |
| Darken the color | A darker green, #2A7D3C, on off-white | 4.7 to 1 | Passes |
| Stop using it for text | Bright green as a bar or a shape, with charcoal text on off-white beside it | 12.5 to 1 | Passes |
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.
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
A “Next” arrow icon
A subheading at 14 points, in bold
A faint pattern in the background
A caption at 12 points
The fill of a button, against the screen behind it
A sentence typed onto a picture and saved as an image, at 14 points
The company logo
The label on a button, at 14 points, not bold
A paragraph at 14 points
A button that's switched off
A heading at 24 points
Your result
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.
| Pairing | Ratio | What it needs | Result |
|---|---|---|---|
| Charcoal on bright green | 4.42 to 1 | 4.5 to 1, because it's 14-point body text | Fails |
| Off-white on deep green | 7.2 to 1 | 4.5 to 1 | Passes |
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.




















