Color Palette Selection
Following quotes from Why We Use Bad Color Maps and What You Can Do About It:
Selection of the color palette is critical as it is the way that your data is the interface between your data and the reader. Careful selection of an appropriate color scale can improve this translation process, for example using shades of red for warmer, blue for cooler or wetter, and brown for drier conditions. This has been the focus of a lot of research and this has resulted in the design of many effective color palettes.
There are three major categories for color scales:
-
Sequential, where colors progress from light to dark or dark to light, are used to convey change in magnitude of a single variable.
-
Diverging, are similar to sequential scales except that two different hues get darker as they move away from a central bright value. These are effective at showing a change from a middle value, for example highlighting a positive or negative change from zero.
-
Categorical, where colors are selected to be easily distinguishable when there is no intrinsic order.
Examples of these a provided at Picking a color scale for scientific graphics.
Why a rainbow color scale is bad for you and your data
Despite how common it is in published documents and as an option in plotting packages, the rainbow color scale is not and never will be your friend.
There are many good publications describing the problems with the rainbow color scales, including this nice overview, Why We Use Bad Color Maps and What You Can Do About It, which provides citations to many more.
To summarize, there are three categories of major problems:
-
Rainbow colors do not follow any perceived ordering, so there is natural sense of which values are higher or lower.
-
Perceived changes in colors are not uniform, as for example colors seem to change much faster in the yellow region than the green region. This can lead to the identification of artifacts that are not in the data that pop because of the narrow band of light blue and yellow that appear bright in the accompanying figure. The rainbow color scheme can also hide important features when colors are not perceived to change as quickly, see the wide, central band of green.
-
The rainbow color palette cannot be correctly interpreted by the 5% of the population that cannot distinguish all of the rainbow’s colors.
Sources of better color palettes
Most of these sites
- The End of the Rainbow? Color Schemes for Improved Data Graphics is the first paper I encountered that addressed the challenges associated with effective color palette selection for data graphics.
- Most of the color palettes described in this paper were created for GMT and are available at /depot/phig/apps/GMTcptfiles. For example, the file
GMT_BrBu_12.cpt
is the brown to blue scale with 12 intervals.
- Most of the color palettes described in this paper were created for GMT and are available at /depot/phig/apps/GMTcptfiles. For example, the file
- The colorbrewer site provides an interactive portal to explore color palettes. Both will provide information on the colors in the scales, and the document, https://www.esri.com/arcgis-blog/products/product/imagery/create-a-custom-color-ramp/, explains how to do a custom colormap.
- Colorgorical: Creating discriminable and preferable color palettes for information visualization a model and tool for creating arbitrarily sized, preferable, and discriminable color palettes for categorical information visualization. Citation
- Panoply NetCDF, HDF and GRIB Data Viewer includes over 100 color tables that may be used as scale colorbars in plots. Many additional color tables are provided at this link. NOTE: Just because this list includes rainbow scales, does not make them acceptable for use.
- CARTOColors: Data-driven color schemes provides custom color schemes built on top of well-known standards for color use on maps, with next generation enhancements for the web and CARTO basemaps.
Using better palettes in common plotting packages
The colorbrewer site (https://colorbrewer2.org) can also provide scales, though the prefer brown to green. Both will provide information on the colors in the scales, and the document,
-
ESRI ArcGIS packages:
- Create a custom color ramp explains how to do a custom colormap.
- ColorBrewer used to have an ArcGIS plugin, but all of the color ramps are now included with ArcGIS Pro, so they only need to be added to ArcGIS Desktop.
- You can download additional Scientific Color maps using this link
- Or you can peruse the ArcGIS color ramp repository using this link
-
R statistical analysis package
- Top R color palettes to know for great data visualization is a nice site with various color scale libraries available for use in R .