Colors for a chart or dashboard
Tell the page what you show. You get colors that stand out from the background and see how far apart they stay under simulated color vision deficiency.
Colors in the right order · CSS and JS array · rules for legend and labels
Your palette
The order is calculated: each further color is as far as possible from the previous ones with normal vision and simulated red-green deficiency. Use the colors in this order.
- Series 1 lines, points, bars
#0072B25.18:1 on background · meets 3:1also as text - Series 2 lines, points, bars
#D55E003.86:1 on background · meets 3:1lines and large elements - Series 3 lines, points, bars
#009E733.42:1 on background · meets 3:1lines and large elements - Series 4 lines, points, bars
#CC79A73.06:1 on background · meets 3:1lines and large elements - Background chart area
#FFFFFF - Text title, values, direct labels
#22222215.90:1 on background · meets 4.5:1 - Axis text axes and legend
#5555557.45:1 on background · meets 4.5:1
More roles (1)
- Grid grid lines, decorative
#DEDEDE1.34:1 on background · decorative only
Colors in the right order · CSS and JS array · rules for legend and labels
How it looks
The simulation approximates strong forms for an average observer. It does not replace testing with people who have color vision deficiency.
Requests per month
- Group A
- Group B
- Group C
- Group D
- Group E
- Group F
- Group G
- Group H
- Key line
- Others
Value per cell
Fixed sample data, the same for every palette.
Copy
This input has no solution, so there is nothing to copy here. Change the input or pick a starter palette.
Hex list
Farbsprache · Okabe-Ito, lines on white · Chart or dashboard · calculated on 2026-10-31
chart-1 #0072B2 lines, points, bars
chart-2 #D55E00 lines, points, bars
chart-3 #009E73 lines, points, bars
chart-4 #CC79A7 lines, points, bars
chart-bg #FFFFFF chart area
chart-text #222222 title, values, direct labels
chart-axis #555555 axes and legend
chart-grid #DEDEDE grid lines, decorative
Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)
Values and checks: https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabeCSS
/* Farbsprache · Okabe-Ito, lines on white · Chart or dashboard · calculated on 2026-10-31
Exactly these hex values were checked. The OKLCH notes lead back to exactly the same hex values.
Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)
Values and checks: https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabe */
:root {
--chart-1: #0072B2; /* oklch(53.19% 0.1313 244.05) · lines, points, bars */
--chart-2: #D55E00; /* oklch(62.13% 0.1705 47.51) · lines, points, bars */
--chart-3: #009E73; /* oklch(62.0% 0.130 165.5) · lines, points, bars */
--chart-4: #CC79A7; /* oklch(67.9% 0.118 346.3) · lines, points, bars */
--chart-bg: #FFFFFF; /* oklch(100% 0 0) · chart area */
--chart-text: #222222; /* oklch(25% 0 0) · title, values, direct labels */
--chart-axis: #555555; /* oklch(45% 0 0) · axes and legend */
--chart-grid: #DEDEDE; /* oklch(90% 0 0) · grid lines, decorative */
}JS array
// Farbsprache · Chart · Compare groups · Okabe-Ito, lines on white · calculated on 2026-10-31
// Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)
// Order calculated: largest smallest distance with normal vision, deuteranopia and protanopia.
const chartColors = ["#0072B2", "#D55E00", "#009E73", "#CC79A7"];
// Values and checks: https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabePrompt for coding agents
Implement the following color system in this project. Use only these tokens and do not invent other colors. If a role is missing, ask or derive it from an existing one: change only the lightness L in OKLCH, keep hue and chroma, and check the contrast again.
# Chart colors “Okabe-Ito, lines on white”
## Idea
The data colors are listed below as --chart-… in a calculated order, on the background #FFFFFF. Use them in exactly this order.
## Tokens
```css
:root {
--chart-1: #0072B2; /* oklch(53.19% 0.1313 244.05) · lines, points, bars */
--chart-2: #D55E00; /* oklch(62.13% 0.1705 47.51) · lines, points, bars */
--chart-3: #009E73; /* oklch(62.0% 0.130 165.5) · lines, points, bars */
--chart-4: #CC79A7; /* oklch(67.9% 0.118 346.3) · lines, points, bars */
--chart-bg: #FFFFFF; /* oklch(100% 0 0) · chart area */
--chart-text: #222222; /* oklch(25% 0 0) · title, values, direct labels */
--chart-axis: #555555; /* oklch(45% 0 0) · axes and legend */
--chart-grid: #DEDEDE; /* oklch(90% 0 0) · grid lines, decorative */
}
```
## Checked pairs
WCAG 2.2, calculated on exactly these hex values, checked unrounded, truncated to two decimals here.
- Text, at least 4.5:1: chart-text/chart-bg 15.90 · chart-axis/chart-bg 7.45
- Data colors on the background, at least 3:1: chart-1/chart-bg 5.18 · chart-2/chart-bg 3.86 · chart-3/chart-bg 3.42 · chart-4/chart-bg 3.06
- Decorative only: chart-grid/chart-bg 1.34
Use any other combination only after checking its contrast yourself.
## Rules
- Give lines, points and bars at least 3:1 against the background. The check above shows the value of every color. Colors below that need an outline in the text color, which itself has 15.90:1. (Standard: WCAG 2.2, 1.4.11; Understanding 1.4.11, informative)
- Where possible, show no more than about seven groups in their own colors. Combine the rest as “Other” in gray or highlight one line. (Research, partly supported)
- Use different colors only for different meanings. Give a group the same color in every chart of a report. (Convention)
- Never show meaning through color alone. Add a word, an icon or a shape, for example where red and green stand for bad and good. (Standard: WCAG 2.2, 1.4.1; Failure F81, informative)
## Known weak spots of this palette
- No weak spots known.
## Avoid
- Mixing in colors from other palettes.
- Changing the order of the data colors without checking the distances again.
- Showing meaning through color alone, without a legend or direct labels.
- Text in a data color that has less than 4.5:1 against the background.
## Check in the product
- List every text and surface pair you actually use and calculate it per WCAG 2.2 without rounding.
- Check transparency, images and gradients as the color that is finally visible.
- Look at every view in grayscale and with the “Deuteranopia” simulation of the browser developer tools.
- Check every line, point and bar for at least 3:1 against the background, otherwise give it an outline.
- Give every gradient a legend with numbers.
- At the end, name which pairs you checked and which you did not.
## Tip
From six series on, label lines directly at their end instead of using a legend. Keep grid and axes quieter than the data.
---
Source: Farbsprache, Chart or dashboard, starter palette Okabe-Ito, lines on white, calculated on 2026-10-31. Values and checks: https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabe
Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)Design tokens (JSON)
DTCG 2025.10 format, for example for Style Dictionary or Figma plugins
{
"$description": "Farbsprache · Okabe-Ito, lines on white · Chart or dashboard · calculated on 2026-10-31 · https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabe",
"color": {
"chart-1": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0, 0.4471, 0.698], "alpha": 1, "hex": "#0072B2"}, "$description": "lines, points, bars"},
"chart-2": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0.8353, 0.3686, 0], "alpha": 1, "hex": "#D55E00"}, "$description": "lines, points, bars"},
"chart-3": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0, 0.6196, 0.451], "alpha": 1, "hex": "#009E73"}, "$description": "lines, points, bars"},
"chart-4": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0.8, 0.4745, 0.6549], "alpha": 1, "hex": "#CC79A7"}, "$description": "lines, points, bars"},
"chart-bg": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [1, 1, 1], "alpha": 1, "hex": "#FFFFFF"}, "$description": "chart area"},
"chart-text": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0.1333, 0.1333, 0.1333], "alpha": 1, "hex": "#222222"}, "$description": "title, values, direct labels"},
"chart-axis": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0.3333, 0.3333, 0.3333], "alpha": 1, "hex": "#555555"}, "$description": "axes and legend"},
"chart-grid": {"$type": "color", "$value": {"colorSpace": "srgb", "components": [0.8706, 0.8706, 0.8706], "alpha": 1, "hex": "#DEDEDE"}, "$description": "grid lines, decorative"}
},
"$extensions": {
"io.github.grundhofer.farbsprache": {
"standard": "WCAG 2.2, contrast checked unrounded, truncated to 2 decimals here",
"notice": "Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)",
"pairs": [
{"fg": "chart-text", "bg": "chart-bg", "ratio": 15.9, "min": 4.5, "criterion": "1.4.3"},
{"fg": "chart-axis", "bg": "chart-bg", "ratio": 7.45, "min": 4.5, "criterion": "1.4.3"},
{"fg": "chart-1", "bg": "chart-bg", "ratio": 5.18, "min": 3, "criterion": "1.4.11"},
{"fg": "chart-2", "bg": "chart-bg", "ratio": 3.86, "min": 3, "criterion": "1.4.11"},
{"fg": "chart-3", "bg": "chart-bg", "ratio": 3.42, "min": 3, "criterion": "1.4.11"},
{"fg": "chart-4", "bg": "chart-bg", "ratio": 3.06, "min": 3, "criterion": "1.4.11"}
],
"decorative": [{"fg": "chart-grid", "bg": "chart-bg", "ratio": 1.34}]
}
}
}Rationale
The palette gives each group its own color. The order is calculated: each further color is as far as possible from the previous ones, also under simulated red-green deficiency. Text reaches 15.90:1 and axis text 7.45:1 against the background per WCAG 2.2 (success criterion 1.4.3). Series 1 has 5.18:1 against the background. For lines and points WCAG 2.2 requires at least 3:1 (success criterion 1.4.11). A legend or direct labels carry the meaning too, because color alone is not enough (success criterion 1.4.1). Calculated with Farbsprache on 2026-10-31: https://grundhofer.github.io/farbsprache/en/charts/?p=cat-okabe Colors after Masataka Okabe and Kei Ito, Color Universal Design (2002)Checked: 6 pairs, 6 pass
| Pair | Contrast | Requirement | Result |
|---|---|---|---|
Text on Background text/bg | 15.90:1 | 4.5:1 WCAG 2.2, 1.4.3 | passes ✓CalculationLuminance #222222 = 0.0160 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.0160 + 0.05) = 15.90:1 |
Axis text on Background text-2/bg | 7.45:1 | 4.5:1 WCAG 2.2, 1.4.3 | passes ✓CalculationLuminance #555555 = 0.0908 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.0908 + 0.05) = 7.45:1 |
Series 1 on Background series-1/bg | 5.18:1 | 3:1 WCAG 2.2, 1.4.11 | passes ✓CalculationLuminance #0072B2 = 0.1525 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.1525 + 0.05) = 5.18:1 |
Series 2 on Background series-2/bg | 3.86:1 | 3:1 WCAG 2.2, 1.4.11 | passes ✓CalculationLuminance #D55E00 = 0.2215 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.2215 + 0.05) = 3.86:1 |
Series 3 on Background series-3/bg | 3.42:1 | 3:1 WCAG 2.2, 1.4.11 | passes ✓CalculationLuminance #009E73 = 0.2569 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.2569 + 0.05) = 3.42:1 |
Series 4 on Background series-4/bg | 3.06:1 | 3:1 WCAG 2.2, 1.4.11 | passes ✓CalculationLuminance #CC79A7 = 0.2930 · #FFFFFF = 1.0000 · (1.0000 + 0.05) / (0.2930 + 0.05) = 3.06:1 |
Decorative only
- Grid on Background: 1.34:1
With color vision deficiency
- Smallest distance between the series: 7.9 (series 3/series 4, deuteranopia).
For comparison: Okabe-Ito 7.9 · simple rainbow 2.8. Reference values, not an established limit.
Not checked
your line widths and point sizes, text in data colors, transparency and overlaps, your screen, printer or photocopier, mild forms of color vision deficiency, the labels of the data sets, for example at ColorBrewer
Rules (4)
- Standard
Give lines, points and bars at least 3:1 against the background. The check above shows the value of every color. Colors below that need an outline in the text color, which itself has 15.90:1.
Sources: WCAG 2.2, 1.4.11 (full text) · Understanding 1.4.11 (informative, full text)
- Research partly supported
Where possible, show no more than about seven groups in their own colors. Combine the rest as “Other” in gray or highlight one line.
Sources: Healey 1996 (full text) · Liu and Munzner, color (full text) · Wilke, color pitfalls (full text)
- Convention
Use different colors only for different meanings. Give a group the same color in every chart of a report.
Sources: Few 2008 (full text) · Wilke, multi-panel figures (full text)
- Standard
Never show meaning through color alone. Add a word, an icon or a shape, for example where red and green stand for bad and good.
Sources: WCAG 2.2, 1.4.1 (full text) · Failure F81 (informative, full text)
Explained briefly
Color vision deficiency: who, how simulated, limits Research well supported
About 8% of men and 0.4% of women of European descent have an inherited red-green deficiency. A blue-yellow deficiency affects fewer than 1 in 10,000 people.
The page converts every color in linear RGB: protanopia and deuteranopia after Viénot, Brettel and Mollon 1999, tritanopia after Brettel, Viénot and Mollon 1997. A comparison of open methods recommends these for complete forms.
The models describe an average observer and strong forms. They were rarely validated with more than ten people. Mild forms, which are more common, are not shown here. So the simulation does not replace a test with people who have color vision deficiency. No palette is guaranteed to work for everyone.
How many colors can a chart take? Research partly supported
In 1996 Healey found that at equal lightness at most seven colors can be found quickly and accurately. A lecture by Liu and Munzner (UBC) gives 6 to 12 color classes as a rule of thumb, including background and highlights. Wilke sees qualitative scales working best with three to five categories and advises direct labels for more than about eight.
So the page offers at most eight colors. From six series on it shows the rule about direct labels. The cut at six is a Farbsprache setting, not an established limit. With more groups, gray for the rest and a single highlighted line help.
Groups, gradient or deviation? Research well supported
The data type decides the palette. Unordered groups need clearly different hues that imply no order. Ordered values from little to a lot need a gradient whose lightness runs evenly in one direction. Deviations from an average need two hues that meet at a light, neutral middle.
ColorBrewer, matplotlib and Wilke distinguish these three kinds in the same way. Crameri and colleagues stress that data set and color scale must match and that every color scale needs a legend.
So first choose above what you show. The page then picks the fitting family.
Is a rainbow always wrong? Research partly supported
A rainbow jumps in lightness. Yellow stands out, green forms a wide band, and parts merge under red-green deficiency. Crameri and colleagues report visual errors of more than 7% of the displayed data range for such scales.
In 2023 Ware and colleagues argue against this: when a value has to be read with a legend, the rainbow was repeatedly the most accurate in studies.
A simple rainbow of seven colors is only 2.8 apart in its worst pair across normal vision and simulated red-green deficiency, Okabe-Ito 7.9. So use viridis or a similar scale for gradients, and a rainbow only with a legend.
Next
Values calculated at build time on October 31, 2026. Sources last retrieved on October 11, 2026.