Color and accessibility: answer guide
For the teacher. Ratios are cut to two decimals, never rounded up, as the checker shows them.
Print in color: Part B is about color.
Part A Measure the contrast
Open each pair in the contrast checker (the link under the pair opens it with the colors filled in, or type them). Write the ratio, then tick whether the pair passes for normal text (4.5:1) and for large text (3:1).
Accept a ratio within 0.01 of the one here: some tools round where this one cuts.
Pair 4 is the one to discuss: 2.99:1 is under 3:1, so it fails even for large text.
| # | Color pair | Ratio | Normal text, 4.5:1 | Large text, 3:1 |
|---|---|---|---|---|
| 1 | #595959 text on #FFFFFF | 7.00:1 | Passes | Passes |
| 2 | #767676 text on #FFFFFF | 4.54:1 | Passes | Passes |
| 3 | #8A8A8A text on #FFFFFF | 3.45:1 | Fails | Passes |
| 4 | #FFFFFF text on #E07B00 | 2.99:1 | Fails | Fails |
| 5 | #4C8DF6 text on #0D1117 | 5.81:1 | Passes | Passes |
| 6 | #E6E6E6 text on #FFFFFF | 1.24:1 | Fails | Fails |
Part B See it as others do
Each pair is two lines on a chart, shown as most people see them and as simulated for the two most common kinds of red–green color blindness. Circle each view in which the two colors look hard to tell apart.
A view is hard to tell apart when the two colors are less than ΔE 10 apart. Students judging by eye may differ by one view; ask them why.
| Seen with | Color pair | Hard to tell apart? |
|---|---|---|
| Typical vision | No ΔE 71.8 | |
| Protanopia | No ΔE 24.9 | |
| Deuteranopia | Yes ΔE 4.8 |
| Seen with | Color pair | Hard to tell apart? |
|---|---|---|
| Typical vision | No ΔE 52.4 | |
| Protanopia | No ΔE 52.5 | |
| Deuteranopia | No ΔE 60.2 |
| Seen with | Color pair | Hard to tell apart? |
|---|---|---|
| Typical vision | No ΔE 55.2 | |
| Protanopia | Yes ΔE 1.4 | |
| Deuteranopia | No ΔE 14.5 |
| Seen with | Color pair | Hard to tell apart? |
|---|---|---|
| Typical vision | No ΔE 26.4 | |
| Protanopia | Yes ΔE 1.8 | |
| Deuteranopia | Yes ΔE 6.1 |
Part C Fix the color
Each text color fails on its background. Find a color of the same hue, darker or lighter, that reaches 4.5:1. The checker suggests one; you may also change the lightness yourself.
Any color of a similar hue that reaches 4.5:1 is right. The one given is the nearest the checker finds, keeping the hue.
| # | Color pair | Nearest passing color | Its ratio |
|---|---|---|---|
| 1 | #FF7F0E text on #FFFFFF (2.53:1) | #BD5B00 | 4.50:1 |
| 2 | #4AA3DF text on #FFFFFF (2.76:1) | #1A7CB6 | 4.56:1 |
| 3 | #D62728 text on #1E1E1E (3.31:1) | #F14640 | 4.51:1 |
Part D Add a second cue
Each design uses color alone to say something. Describe one change that says it another way too.
A sign-up form marks the field with a mistake only by turning its border red.
A model answer Put a short message next to the field that says what is wrong and how to fix it, with an error icon. In code, mark the field
aria-invalid="true"and pointaria-describedbyat the message, so a screen reader says it too.A line chart shows sales in red and profit in green, with a color key below it.
A model answer Write each line’s name at its end, give the lines different markers or dash patterns, and choose colors that stay apart in Part B’s simulations.
Links in a paragraph are blue and not underlined; the rest of the text is dark grey.
A model answer Underline the links. If the design must not, make the link color reach 3:1 against the surrounding text and add an underline when a link is hovered or focused.
WCAG 1.4.1
Exit question
A brand’s orange, #FF7F0E, fails as text on white. Name two changes that keep the orange in the design.
- Use a darker orange of the same hue for text: #BD5B00 reaches 4.50:1 on white.
- Keep the bright orange as a background and put dark text on it: #1C1B19 on #FF7F0E is 6.79:1.
- Use the orange for shapes that carry no meaning on their own, such as a rule or an illustration, and keep the words in a passing color.
Any two of these, or another change that keeps the orange and leaves the text at 4.5:1 or more, is right.