Start with a question: if your chart lost its colors, could a reader still tell which line represents which series? Distinct hues can make a chart easier to scan, but they cannot do the whole job. Confirm that a reader can identify a line, follow it through a crossing and recover its values even without matching a color to a legend.
One dataset, two readings
The figure above uses invented order counts. In the first panel, two equally styled strokes rely on color matching to the key. In the second, the online series is solid with circles and the in-store series is dashed with squares. Direct labels finish the job: the legend is no longer needed to identify an endpoint. The axes, units and values are the same.
| Month | Online orders | In-store orders |
|---|---|---|
| January | 42 | 48 |
| February | 57 | 51 |
| March | 68 | 55 |
At a narrow viewport, move labels or shorten them instead of shrinking them until they are unreadable. Show the data as text alongside the chart; a precise value should not require a pointer or a tooltip. If the chart has controls, include visible focus and make the equivalent action possible by keyboard.
Five Okabe-Ito hues plus a separate ink
The palette below borrows five hues from Masataka Okabe and Kei Ito’s Color Universal Design palette. These are a subset, not the complete palette. The dark ink is our own label and outline color. Use different marks or labels as well as hue, as the authors recommend. A categorical color is not intrinsically a success or error signal.
Three separate accessibility checks
- Meaning: WCAG 1.4.1 addresses information conveyed by color alone. Pair a hue with a label, pattern or shape.
- Text: WCAG 1.4.3 sets AA thresholds of 4.5:1 for normal text and 3:1 for large text. Apply them to the actual axis, legend and in-bar text colors.
- Required graphical information: WCAG 1.4.11 calls for 3:1 against adjacent colors for the meaningful marks or boundaries the reader needs. That may be a background, a neighboring segment or an outline, not just the white page.
| Foreground / adjacent color | sRGB contrast | Implication |
|---|---|---|
| #0072B2 / #FFFFFF | 5.19:1 | Normal text AA and required marks on white |
| #D55E00 / #FFFFFF | 3.87:1 | Required marks on white; fails normal text AA |
| #009E73 / #FFFFFF | 3.42:1 | Required marks on white; fails normal text AA |
| #CC79A7 / #FFFFFF | 3.06:1 | Just clears 3:1; avoid relying on a fine stroke |
| #E69F00 / #FFFFFF | 2.25:1 | Insufficient as the sole required edge on white |
| #D55E00 / #009E73 | 1.13:1 | Low contrast where the two marks touch |
| #0F1117 / #E69F00 | 8.38:1 | Dark labels or a dark boundary inside orange |
| #0F1117 / #FFFFFF | 18.87:1 | Dark text and a visible outline on white |
A 3:1 mark-to-canvas ratio does not tell you whether two touching marks are distinguishable. Use a gap or high-contrast separating edge when the edge matters, and a second encoding when the series identity matters. Test very thin strokes and crowded crossings at their actual size; rounding a borderline failing number to 3:1 does not make it pass.
Use the Contrast Checker for exact solid color pairs. Run a grayscale or color-vision preview to find weak spots, then test whether people can read the chart and its text alternative. Neither a simulation nor a single contrast score certifies a dashboard.
Frequently asked questions
Are Okabe-Ito colors automatically accessible?
No. A categorical palette is a starting point. Check each meaningful mark against the colors beside it, and duplicate information with labels, shapes, stroke styles or patterns. Provide the values in a readable table when the chart carries exact data.
Can I use orange or green as chart labels?
For the example white canvas, vermilion is 3.87:1 and bluish green is 3.42:1. Both exceed 3:1 against white, but both fail the 4.5:1 minimum for normal text. The example uses dark ink for its labels.
What should I test after picking a palette?
Check the smallest chart size, touching or crossing marks, reduced-color and grayscale views, and any hover or selected state. Make the same data available without hover or color matching.