A diverging color palette is a type of color scheme that uses two distinctly different hues to represent data that is ordered from high to low or vice versa. The colors “diverge” from a light or dark midpoint to highlight differences between high and low values.
How diverging palettes work
Diverging palettes map quantitative data onto a color scale with a light or dark midpoint. Higher values are represented by colors on one side of the midpoint, while lower values are represented by colors on the opposite side.
For example, a common diverging palette uses blue for low values, white in the middle, and red for high values. This makes it easy to see at a glance whether a data point is high or low compared to the midpoint.
The most common midpoint colors are white, black, or a neutral gray. However, any two distinctly different hues can be used as the endpoints, with the midpoint being a color in between them on the color wheel.
Benefits of using a diverging color palette
There are several key benefits to using a diverging palette for data visualization:
- Makes high and low values immediately recognizable
- Draws attention to differences between data points
- Allows quick comparison to the midpoint
- Works well for representing ordered, quantitative data
- Provides balanced color representation on both sides of the midpoint
Diverging palettes make it easy for the viewer to interpret the meanings of the colors. The visual separation of the two hues clearly indicates if a value is high or low relative to the norm.
Types of diverging color palettes
There are a few common types of diverging color schemes:
Blue-White-Red
This is perhaps the most commonly recognized diverging palette. It uses blue for low values, white in the middle, and red for high values. This color progression is intuitive for most data sets that have an inherent order.
Green-White-Purple
This scheme provides an alternative to red-white-blue that is colorblindness friendly. The green and purple still distinctly diverge from white in the middle.
Single-Hue
A single-hue palette varies lightness and saturation of one color on both sides of the midpoint. For example, a blue palette could go from light blue to dark blue.
Multi-Hue
More than one hue can be used on each side of the midpoint. A blue-green and orange-red palette is an example.
When to use a diverging color palette
Diverging palettes work best for data with an inherent order, such as:
- Temperatures (hot to cold)
- Elevation (high to low)
- Scores (high to low performance)
- Political affiliations (liberal to conservative)
- Likert scale surveys (strongly disagree to strongly agree)
Essentially, diverging palettes are ideal for any data that can be represented on a spectrum with a meaningful midpoint or neutral value.
Examples of diverging color palettes
Here are some examples of data visualizations that effectively use diverging color palettes:
Election Map
This election result map uses red for Republican votes and blue for Democrat votes. The colors diverge clearly from the swing state gray midpoint.
State | Republican Votes | Democrat Votes |
---|---|---|
California | 30% | 70% |
Texas | 70% | 30% |
Florida | 51% | 49% |
Survey Results
This survey uses green and red to show positive and negative responses diverging from the neutral yellow midpoint.
Question | Strongly Disagree | Disagree | Neutral | Agree | Strongly Agree |
---|---|---|---|---|---|
I like pizza | 10% | 5% | 5% | 30% | 50% |
Traffic is bad | 50% | 30% | 10% | 5% | 5% |
Temperature Map
This weather map displays temperature variation across a region. It uses blue for cold temps and red for hot with a pale green midpoint.
City | Temperature |
---|---|
Houston | 91°F |
Denver | 72°F |
Seattle | 55°F |
Tips for using diverging color palettes
Here are some tips for effectively using diverging palettes in data visualization:
- Ensure data has an inherent high to low order
- Consider colorblind friendly options like green-white-purple
- Use easily distinguishable colors for maximum contrast
- Select a midpoint color that is neutral and not distracting
- Try single-hue palettes for minimalism
- Use consistent colors across charts for better comprehension
Tools for creating diverging palettes
Many data visualization and design tools have built-in options for generating diverging color palettes. Some examples include:
- Adobe Color
- Tableau
- D3.js
- Matplotlib
- Canva
Additionally, online palette generators like Colormind.io allow creating customized diverging color scales.
Alternatives to diverging color palettes
Diverging palettes work very well for ordered data, but there are other color scheme options too:
- Sequential – Good for representing data on a continuum, like percentages or magnitudes
- Qualitative – Use distinct colors for categorical data with no natural order
- Single hue – Vary lightness and saturation of one color for simplicity
The key is choosing a color scheme that matches the data type and relationships you want to highlight.
Conclusion
Diverging color palettes are ideal for visualizing ordered, quantitative data on a high to low spectrum. They make it easy to interpret the meanings of colors by mapping data values to distinctly different hues diverging from a midpoint. With the proliferation of complex datasets, diverging palettes will continue providing intuitive and comprehensive visual data analysis.