Color in Data Visualization: 6 Rules for Clear Charts
Six practical rules for using color in data visualization, from picking the right palette type to checking contrast and color blindness.

Using color in data visualization well comes down to one idea: color is a channel for data, so every color on a chart should mean something. When it does, readers find the pattern in seconds. When it does not, they spend their attention decoding the legend. These six rules cover the decisions that matter most, in the order you usually make them.
How should you use color in data visualization?
Use color in data visualization only to encode something: a category, a magnitude, or the one thing you want noticed. Match the palette to the data type (distinct hues for categories, a light-to-dark ramp for amounts, two ramps for values around a midpoint), keep the same color for the same thing everywhere, and check that the chart still reads in grayscale.
| Your data | Palette type | Example |
|---|---|---|
| Unordered groups | Categorical: distinct hues | Parties, products, fuel types |
| Low to high amounts | Sequential: one hue, light to dark | Vote share, income, density |
| Values around a midpoint | Diverging: two hues meeting at a neutral | Change vs last year, above or below 50% |
| One thing among many | Highlight: one color plus gray | Your company against competitors |
1. Pick the palette type from the data
Most color mistakes are a mismatch between palette and data. A rainbow on a measure that runs from low to high forces readers to memorize which hue is bigger. A gradient on unordered categories suggests a ranking that does not exist.
The map below shades one continuous measure, Karol Nawrocki's vote share in each Polish voivodeship in the 2025 presidential runoff, with a sequential scale. Light means a lower share and dark a higher one, so the south-east stands out without a single label.
A diverging scale with its midpoint at 50% would answer a different question: who won each region. Same data, different palette, different story. That is why the palette type comes first. The tool at ColorBrewer sorts its palettes into exactly these three groups, and color scale bias covers what goes wrong when a scale's lightness does not rise steadily with the value.
2. Use colors that are easy to tell apart
Categories need hues that differ clearly, not five shades of blue-green. Two checks help:
- Count the categories. Past six or seven colors, people stop being able to match a line to its legend entry. Group small categories into "Other", or label the lines directly.
- Vary lightness, not only hue. Colors that differ in lightness survive a black-and-white printer and are easier for color-blind readers.
On a line chart or stacked bar chart with many series, direct labels beat a legend, a point made in detail in how to choose chart colors that do the legend's job.
3. Use color in moderation
If a chart has one data series, it needs one color. Coloring every bar of a simple bar chart differently adds a variable that carries no information, and readers will look for a meaning that is not there.
The strongest use of restraint is the highlight: draw everything in gray and give one color to the bar, line or region the chart is about. The reader's eye lands on it first, which is the whole job of a headline chart.
4. Let color follow meaning
Some colors come with expectations. Red reads as loss, danger or heat, green as growth, blue as water or cold. Political parties, sports teams and brands have colors their audiences already know. Working with those associations saves the reader a lookup, and working against them (profit in red, loss in green) causes real misreadings.
Two cautions. Associations vary by culture and context, so check them for your audience. And do not lean on red against green as the only signal: it is the most common pair that color-blind readers cannot separate.
5. Keep colors consistent
Once a color means something, it has to keep meaning it. If Europe is blue in the first chart of a report, it is blue in every chart after it, and blue is never reused for anything else. Readers learn the mapping once and stop checking the legend.
In practice this means choosing a palette before making the charts, and assigning colors to categories by name rather than by position, so a category that drops out of one chart does not shift everyone else's color.
6. Check contrast and color blindness
According to the US National Eye Institute, about 1 in 12 men is color blind, most often with red-green confusion. A chart for a general audience will be read by some of them. Three quick tests catch most problems:
- Convert the chart to grayscale. If the series merge, add lightness differences.
- Run it through a color-blindness simulator, or follow a color-blind-friendly palette guide.
- Check the marks against the background. The WCAG 2.1 guideline on non-text contrast asks for at least 3:1 for the parts of a graphic needed to understand it.
Then add a second cue where it matters: a label, a pattern or a shape, so color is never the only way to read the chart. The wider checklist is in making data visualizations accessible.
Applying the rules in a chart tool
In PlotSet, palette settings sit with each template: categorical colors for series, and sequential or diverging scales with custom low, middle and high colors on maps and heatmaps, such as the choropleth map. Set the palette once, then reuse the same colors across the charts in a report. For a step-by-step walk through the settings, see how to apply color to data visualizations.
FAQ
What is the best color palette for data visualization?
There is no single best palette. The right one depends on the data: distinct hues for categories, a light-to-dark ramp of one hue for amounts, and two hues meeting at a neutral midpoint for values above and below a reference point.
How many colors should a chart use?
As few as the data needs. One series needs one color, and for categories six or seven is a practical limit before readers struggle to match colors to a legend. Beyond that, group small categories or label marks directly.
What is the difference between sequential and diverging color scales?
A sequential scale runs from light to dark and suits values that go from low to high. A diverging scale uses two hues that meet at a neutral middle and suits values with a meaningful midpoint, such as zero change or a 50% vote share.
Why should charts avoid red and green together?
Red-green confusion is the most common form of color vision deficiency, so a chart that separates two series only by red and green is unreadable for those readers. Change one hue, or make the two colors differ clearly in lightness.
Should every bar in a bar chart have a different color?
No. If the bars show one measure, use one color, and highlight a single bar only when the chart is about it. Different colors per bar suggest a category difference that the data does not contain.


