Part 4 - Guidelines for Colour
Technical Guideline Series
Revised by Renske Gudde - Technical Support Unit (TSU) of Knowledge and Data Reviewed by Aidin Niamir - Head of the Technical Support Unit of Knowledge and Data and Rainer M. Krug - IPBES Task Force on Knowledge and Data For any inquires please contact aidin.niamir@senckenberg.de
Version: 1.2 Last Updated: 9 November 2023
This technical guidelines focuses on recommendations for the use of colour in maps and can be applied to other visualisations. We present some base considerations for colour paired with links to useful resources for further exploration to be used by all IPBES experts creating figures and maps.
Begin by loading the following packages:
I. Overview of Pallets:
A Types of Pallets:
Colour is a critical key to communicating information to audiences. Often incorrect colour schemes are used that either make it difficult for people to understand the map or bias the interpretation. There are generally three types of palettes, qualitative, sequential, and diverging each corresponding to distinctive qualities of the data they represent.
Qualitative or categorical palettes have distinctive colours that are used to represent nominal or qualitative data with no presumed ordering, such as gender or cereal brands. Sequential palettes often represent continuous data such as temperature or height. These palettes are generally marked by even steps in value or intensity of a hue. Diverging palettes have two sets of sequential palettes meeting on a mutual colour which can represent continuous data with an obvious midpoint, such as data representing change from a baseline, or are often used to represent Likert scale survey responses.
B. Colour Blind Friendly Palettes
When creating a map or figure, please choose colour schemes that are colour blind friendly (more information about colour palettes and colour blindness or about colour schemes and contrasts). Printing a map or figure in black and white or grey tones are a good method to see how well the map or figure is interpretable without colour. Especially for maps, when areas without sufficient data are indicated, it is advisable to use a pattern instead of grey scales, because without the use of colour it can seem that there is a value for the data deficient areas.
There are various apps to simulate colour blindness:
Sim Daldonism, open source for Mac and iOS, to simulate various types of colour blindness
Color Oracle, free available for Windows, Linux and Mac, focussing on the extreme forms of colour blindness (so that people with colour blindness that is less extreme or normal colour vision can also interpret the figures easily)
ColourSimulations, real-time simulations of red-green colour-blindness for Windows.
There is also an R-package colorBlindness (with its own guide) which provides a collection of safe colours for various types of figures and maps.
C. No rainbow colour palettes
Rainbow colour schemes are interpreted by humans to have sharp artificial boundaries that are not representative of the underlying data. Crameri et al. 2020 covers in more detail the current problems involving the use of colour in science communication. An example of this is presented in the figure below taken from this article where geoid height is displayed using a sunset scheme and then a traditional rainbow scheme. Large jumps in the data are interpreted within the lines of light blue and yellow that are not inherent within the data.
Figure 2: Map illustrating the differences of interpretation of data displayed with a sunset palette scheme and the traditional rainbow palette.
II. RColorBrewer in R and Examples
A. RColorBrewer
In R, one can use the RColorBrewer package which provides convenient qualitative, sequential, and diverging palettes.
To display all of the prepared palettes within the RColorBrewer package run this line of code:
To display all of the colourblind friendly palettes run this:
If you would like to visualise a specific palette, specify the number of colours and the palette name.
This article provides a great overview on how to use the RColorBrewer package with these palettes integrated with ggplot with examples.
B. Hexadecimal
R uses hexadecimal to represent colours. “Hexadecimal is a base-16 number system used to describe colour. Red, green, and blue are each represented by two characters (#rrggbb) that has 16 possible symbols.” - R colour cheatsheet
These values can be used to specify specific colours for a plot. To return the hexadecimal colour code of a palette, use this code: brewer.pal(n, name)
For example:
We could then call those specific colours in a plot, as opposed to using general names like “blue” or pre-set palettes.
C. Examples
The next two examples showcase how to use the package RColorBrewer to set palletes within maps. We will use the populated places dataset from R natural earth website available in the first example here for free download. These are just example datasets whose accuracy has not been checked.
First run this code to download country data and the large cities dataset we will be working with. The code also projects both datasets to the Robinson Projection.
Example 1: Continuous Data We will use population information contained in the large cities dataset, which is a continuous variable. The function scale_color_gradient() is used for the continuous data. The hex values were obtained from the brewer.pal function shown in the last section.
Example 2: Categorical Data We now will use the land dataset and function scale_fill_brewer() to set the colour of the continents according to one of the qualitative palettes included in the RColorBrewer package.
III. Suggestions
Use colour schemes and projections consistently throughout the chapter, if possible throughout the assessment.
No data is symbolized with the colour grey (BBBBBB; RGB:187, 187, 187)
White or light sky blue (87CEFA; RGB: 135, 206, 250) is used for the ocean in maps
Don’t overload colour - avoid colour when not necessary - use it to highlight important information
Grey normally represents NA data in a map, but can be very useful in other plots to focus your audience’s attention on key parts of your visualisation that have colour
IV. Additional Resources
Useful tool to assist in picking palettes and colours: https://colorbrewer2.org/
Tool to visualise colours as someone with different types of colour blindness: https://davidmathlogic.com/colorblind/#%23D81B60-%231E88E5-%23FFC107-%23004D40
colourBlindness Package guide: https://cran.r-project.org/web/packages/colorBlindness/vignettes/colorBlindness.html
Your feedback on this content is welcome. Let us know what other useful material would you like to see here by emailing aidin.niamir@senckenberg.de.
Last updated