How to Use Color in Data Visualizations

The image above highlights François's langurs, one of the most uncommon monkey species. Notably, their infants boast vibrant orange fur, which darkens to black as they mature. Prevailing theories suggest that this orange hue enables parents to monitor their young amidst the treetop surroundings¹ easily. This is vital for promptly identifying and reacting to threats, such as an imminent predator attack. Were an adult monkey able to verbalize, it might exclaim:
Grab the orange ones!
Kudos should be awarded here to Mother Nature. Thanks to the effective use of color, the existence of the smallest and most vulnerable can potentially be preserved.
Why is color so important in data visualization?
I must admit that I hesitated to publish this post for a long time. The reason is that this topic is widely covered. Nonetheless, I still see a niche, especially in presenting practical nuances of using color.
I introduced already the functional use of color concept in one of my recent posts. Now, I want to share a few more tips in this area. I hope you will find them practical and unbiased. Let's begin with some examples of ineffective color use.
1. Decoration before function
This problem emerges should we have no clear explanation of why color was applied in a specific visualization. Take this chart, for example. Can you clarify why such an abundance of colors was applied here?

Sometimes, aesthetics is a viable explanation. But that's a tricky one. We are entering a shady area of tastes, likes & dislikes. What is visually appealing to one may be unacceptable to others.
2. Lack of consistency & objectivity
Sometimes, we inconsistently use saturation or lightness levels in our visualizations. We do so by selecting colors from a palette (like in PowerPoint) without ensuring consistency across slides. This may be sometimes caused by negligence, but primarily by haste. While most will overlook such an "issue", some keen observers might not.

Negligence manifests typically when crucial information is inconsistently highlighted: yellow on one slide, blue on another. Similarly, missteps occur with inconsistent color coding – when a given color represents one element, like a budget on one page, then on another one— results or forecast.
3. Disregard to color-impaired users
Numerous stellar publications highlight the problem adeptly. Insight into the issue can be gleaned through tools like Adobe Color, showcased below, which facilitates a comparison of how different color combinations cater to various visual impairments. And even though I don't have a sight impairment (or I think I don't), I struggle to distinguish between certain shades and gradients.

4. Not accounting for context
Colors aren't seen in isolation: their surroundings influence them. Even though our eyes detect color through light wavelengths, we see color by comparing it to its neighbors.
Consider the below example. The same square looks different when placed in different spots across a gradient from white to black. We see each square differently because it's next to varying gray shades. It looks darker against light gray (on the left) than it does against a darker shade (on the right).²

5. Using color for precise visualization
While color can represent values, it's not optimal for precise comparisons. As presented below, hue and saturation rank low in the precision field. This indicates they're less accurate and more prone to user error in value assessment.

Why is it so important to use color properly?
As evidenced by the above examples, colors profoundly influence our perception of information. That's why it plays a crucial role in data visualizations.
Have you ever encountered the term "preattentive processing"? It refers to the initial phase in our two-step information absorption process. This first stage is automatic, involving heuristics, reflexes, and pattern recognition – elements we don't actively ponder. Preattentive processing primarily notices the most prominent characteristics of information presented to us, such as shape, size, and color! However, it's not flawless. Given its impulsive nature, it can sometimes misguide us.
Consider this (non-color example):
Items A and B cost $110, with Item A being $100 more expensive than Item B. Many might instinctively say Item B is $10. But then, A would cost $110, and both items $120. The correct price of B is $5. In many cases, those who answered $10 had been misled by preattentive processing.
That's evidence of why we must use it consciously!
Brief theory of color³
Before I present my ideas for the effective use of color, I would like to show some theoretical settings.
There are two essential components to the theory of color (to my simplified understanding):
- color anatomy, and
- color hierarchy.
Color Anatomy
Color anatomy, dissecting how we perceive color, comprises three core components:

Hue pertains to the color or shade as perceived. Simply speaking – that's what we call color, e.g., red, green, blue, etc.
Saturation denotes the intensity of a color, where high saturation yields vibrant colors and low saturation results in duller, whiter hues.
Lightness, while akin to saturation, involves tints and shades – degrees of black and white – rather than color brightness.
Both lightness and saturation create a notable scale of intensity, usable to highlight differentiation.
Color harmony
Color harmony embodies the idea that specific color combinations can yield visual contrast or cohesion. Depending on the narrative you wish to convey with your data, the arrangement you select can optimize impact.

How to use color in data visualization?

For users to successfully engage with information in a visualization, they must:
- Find it,
- Read it, and
- Understand it.⁴
"Find it"
Visualizations should enable users to locate crucial information with minimal cognitive effort. More vital information should be more salient than less critical data. Color codes, aimed at differentiating operationally critical data, must always be discernible.
"Read it"
Legibility is paramount in displaying operationally vital information across all conditions. To assure legibility:
- Ensure sufficient contrast between symbols (or text) and backgrounds.
- Symbols or text should be of a size and stroke width that ensure visibility and readability.
"Understand it"
Once information is found and read, colors should facilitate user understanding with minimal cognitive effort and error risk.
- Color coding: Color codes, intended to differentiate classes of critical data, should be easily identifiable, limited in number, and discernible on all backgrounds.
- Consistency: Color codes should be applied consistently throughout the report or presentation: each color code can represent only a single data category (or a single color can represent all data categories).
- Conventions: Adherence to cultural conventions is helpful (e.g., red for warning, yellow for caution, green for safety).⁴
Color isn't just about making your data look pretty; it's about guiding your audience through a story and making complex information digestible.
How to deal with color in data presentations?
Why, why, why?
That's the key question when choosing visualizations and their elements. Color must be used exclusively in data storytelling to fulfill a distinct communicative intent. Colors should not merely adorn a graphic. While enhancing a chart aesthetically may serve, for instance, brand awareness or advertising goals, it will divert attention from what is genuinely pivotal for data storytelling purposes. And that is the data embedded in our message.²
Start from grayscale!
So, how do I work with color? As Cole Nussbaumer Knafflic advises in a YouTube interview, my visualizations' initial version is typically crafted using grayscale (with possible exceptions for axis lines or labels). Then, I apply different colors, but always with a clear purpose, such as capturing attention or aiding understanding.
I find satisfaction in demonstrating the efficacy of this approach while "enhancing" the so-called spaghetti Charts, as displayed in the image above. Such charts typically falter as a communication method. However, a straightforward tactic – focusing on a single series at a time while utilizing the others (colored grey) as background information (for instance, to illustrate trends) – can be pretty effective.

Reconsider your visual⁵
All right, we started with grayscale, applied Colors, and ended with a Christmas tree. Literally.
Occasionally, the inclination to over-utilize color arises from selecting an inappropriate visual. Consider the below examples inspired by the Datawrapper blog. While gradient colors can effectively display patterns, such as on a choropleth map, they challenge discerning actual values and differences. Opt to display your most crucial values using bars, position, or areas, reserving colors to distinguish categories or focusing attention. This should result in quicker value interpretation by readers.

Consider employing a different chart type or grouping categories if a chart demands more than seven colors. While colors help readers differentiate data categories, utilizing too much color can hinder swift data comprehension due to frequent references to the color key.

Use distinct colors
Okay. So, we have chosen the correct visuals. Nevertheless, when deciding on the colors, we must ensure they are differentiated. Hues are pivotal in creating color distinctiveness. While lightness and saturation adjustments can add variation over differences, they may imply a false hierarchy of importance – unless that's the intention (I will show it later). For instance, we should avoid using two colors with identical hues but varied lightness and saturation unless their associated values are inherently related.⁷
Contrast rules
Color needs context, as showcased in the initial paragraphs. I recommend considering the two below rules to ensure contrast with colors.
Rule 1: Ensure that objects of the same color in a table or chart appear identical by providing a matching background color.
Rule 2: For clear visibility of objects in a table or chart, employ a background color that contrasts sufficiently with them.
A direct application of Rule 1 in charts is to sidestep using background color gradients or varying background colors. Avoiding unnecessary chart decoration is critical to clear and compelling data presentation.²
The fundamental rule of contrast I apply says:
- Light background with dark elements (e.g., white background, black font, dark grey chart fill, blue fill for highlighting).
- Dark background with light elements (e.g., black background, white font, light grey chart fill, yellow fill for highlighting).
Background color
Two colors work: white or black.
Just kidding! Almost any color is a game, whether light or dark, provided you follow specific guidelines, some of which I'll outline below. One rule I often adhere to is utilizing a light background for longer presentations, as it tends to be less eye-straining over extended viewing periods. I might choose a dark background for shorter presentations, primarily for aesthetic reasons or personal preference. I do avoid, however, all the flashy color variations.

Three color rule
After I have chosen the background color, I must decide on other elements. Here, I try to apply "the three-color rule". The three-count does not include background, which serves as the "context-setter". And to be honest with you, I typically fail to adhere to this rule perfectly. And that's okay. So long I minimize the number of colors, the achieved effect usually does not fall far away from the desirable one.
For light backgrounds (typically white), I use the following colors:
- Color 1: Generally black or dark grey is reserved for text (title, body text).
- Color 2: Usually medium grey is applied to less relevant chart elements (fill, labels, grids, etc.).
- Color 3: Typically blue is used for highlighting important text or visualization elements. Sometimes, I use green for positive and red for negative to indicate changes.
For dark backgrounds (which most frequently are straight black in my presentations):
- Color 1: White for text.
- Color 2: This could be the same as in the case of a light background, provided it's easily discernible.
- Color 3: I might choose subdued yellows, with the green or red rule also applying.
Exceptions might occur, but only if necessary (e.g., adding a white or black font to differentiate labels placed directly on the visualization).
And that's it. Here is what it can look like.

Reference palette

Sometimes, I get confused with the color selection anyway. Especially when I pick colors outside the standard PowerPoint palette. But I have a trick that helps me to mitigate this. I've spotted it in well-crafted corporate templates. They sometimes contain a color palette, often placed on the final slide. Without such a template, I craft my reference palette using shapes filled with reference colors. Whenever I'm uncertain which color to choose, I navigate to this last slide and select the color using a color picker. It's a fail-safe method!

If you produce a large number of presentations, it might be efficient to establish a standard set of quality colors. Ideally, create several color palettes, each designed for specific uses. At a minimum, develop three palettes: one with vivid colors, a second with medium shades easily discernible to the human eye, and a third with light, nearly transparent colors.²
Use intuitive colors
I strongly recommend deciding on a color palette that resonates with the cultural understanding of your audience, utilizing colors they would naturally associate with your data. As much as it is possible. Consider the visualization below, inspired again by a post on a Datawrapper blog.⁵

One remark: while the green-red duo is commonly used to denote a good-bad relationship, it's crucial to note that around 5% of the population struggles to distinguish these colors. For instance, adding a blue tint to green could help ensure clarity for a wider audience.⁶
Mind the psychology of color
When speaking about color intuition, a thing worth noting is the most common color interpretations.
These are the most widespread interpretations of colors across cultures:

This may be slightly different in business. Here's what colors could be used depending on the business purpose:

Grayscale test for color differentiation

While I lack scientific evidence and can't guarantee its universal application (e.g., aiding those with specific sight impairments), this method has helped me multiple times. I call it "the grayscale test." You can do it easily in PowerPoint. You must select the "Grayscale" option instead of the "Color" option in the print tab. Then, the display in the "Print Preview" window will change its coloring. If you can still differentiate between series on categories in the visualizations, you can congratulate yourself: you have done the job well.

In the image below, I show you what I mean. The chart on the right side is presented using the grayscale. Regardless, it's still possible to see the difference between categories.

Using color to present sequence in numbers
In utilizing color to depict a sequential range of numerical values, adhere to a single hue (or a closely related set), varying intensity from light for low values to darker, more saturated colors for higher values. We intuitively perceive colors of increasing intensity as increasing numerical values, although this perception doesn't extend to different colors.
These colors could be assigned to four sets of columns in a chart to indicate the performance of four divisions against a plan throughout the year, from worst (darkest) to best (lightest).

Employing a set of ordered colors in a heatmap can visually present high sales values, quickly identifying which products sold best or worst and which provinces or products performed best or worst, even without values.²
Sequential and divergent palettes
A sequence palette encompasses a single set of ordered colors that perceptually escalate. In contrast, as demonstrated here, a divergence or two-step palette consists of two-color sequences that intensify symmetrically from a central midpoint, each in opposite directions.
The divergence palette effectively illustrates numeric values above and below a logical midpoint. For instance, a company's profits might be depicted via a heatmap using a divergence palette: one palette for profits, another for losses, with zero as the midpoint.²

Some useful tools
There are plenty of tools out there that could help you with effective color selection. I mentioned Adobe Colors previously. Here are some other tools you may consider using when designing effective color pallets:
- Coolors
- ColorZilla (Chrome web browser extension)
- ColorBrewer 2.0
- Viz Palette
- Data Color Picker
- Chroma.js Color Palette Helper
- I want hue
How do I use such tools?
First, I decide on the key color. This could be, for instance, one of the colors of your company logo. Or the color used for corporate communication. Or whatever color that inspires you. The second step is use the app to pick a color harmony: fitting to the background and intended effect. Finally, I do my best to minimize the number of hues (be mindful of the three-color rule!).


Employing LLMs & Generative AI
ChatGPT and DALL-e 3
Lastly, we can help ourselves using LLMs. Here is a simple example generated in ChatGPT with DALL-e 3.
Here is my first take: the initial prompt and some generated ideas.


And here is version 4 after some fine-tuning (took me 3–4 additional prompts). I can use it to inspire subsequent slides, pick the colors, use similar fonts, etc.

ChatGPT and Canva
Another approach you can take is using ChatGPT with the Canva plugin.

Here is one of the ideas I got.

ChatGPT standalone
Okay. The above functions are enabled for ChatGPT Plus (paid) users. Nevertheless, if you operate on the free version of ChatGPT, you can still use it for help, as evidenced below.

Concluding remarks
Color isn't just about making your data look pretty; it's about guiding your audience through a story and making complex information digestible. From observing the nature to interacting with our colorful computer screens, color influences our perception, understanding, and recall of experiences and information.
Effectively using color in data visualizations involves more than selecting appealing shades. It encompasses:
- Communicating clearly: Ensuring data is easy to find, read, and comprehend without effort.
- Being consistent: Adopting a set palette to maintain consistent color meanings across visuals.
- Being inclusive: Choosing palettes that are perceptible to those with color vision deficiencies, recognizing that color perception varies.
The secret lies in harmonizing aesthetic allure with clarity and precision, crafting captivating and enlightening visuals.
By adhering to fundamental color theory principles, prioritizing accessibility, and utilizing a strategic and consistent color palette, you can transform your data visualizations from simple charts into compelling narratives. Let color be your ally in narrating your data's story, steering viewers through the visualization, and delivering a coherent, accessible, and memorable user experience.
Did you like this article? Consider a subscription to get notified about new stories I publish or follow me.
References:
- Andy Jeffrey, As babies, François's langur monkeys rock a neon orange coat
- Skuteczne Raporty, Dziewięć zasad skutecznego użycia koloru (Ten rules of efficient use of color)
- Revuint, The Role of Color Theory in Data Visualization
- NASA AMES Research Center, Hierarchy of color usage guidelines
- Lisa Charlotte Muth, What to consider when choosing colors for data visualization
- Weronika Gawarska-Tywonek, The Function of Color in Data Viz: A Simple (but Complete) Guide
- Michael Yi, How to Choose Colors for Your Data Visualizations
- Dimira Teneva, Psychology of color: What different colors mean in marketing