IPBES ICT guide
  • IPBES ICT documentation
  • Data and Knowledge Management
    • Policy
    • Tutorials
    • Organisation of Work
      • A - File naming
      • B - Versioning scheme
      • C - Experts list
    • Technical Guideline Series
      • Part 1 - Conversion to the Robinson Projection
      • Part 2 - Preparing and Mapping Data to IPBES Regions and Sub-regions
      • Part 3 - Cartographic Guidelines
      • Part 4 - Guidelines for Colour
      • Part 5 - File formats
      • Part 6 - How to Upload to and Download from Zenodo
      • Part 7 - How to Cite IPBES Assessment Reports
      • Part 8 - Guidelines for the delivery of figures
      • Part 9 - Considerations When Working with Indigenous and Local Knowledge
      • Part 10 - Contributing Authors Template Email
      • Part 11 - How to Document an Indicator
      • Part 12 - Snowballing for Literature
    • Citations of IPBES Assessments
      • Transformative Change Assessment
      • Nexus Assessment
      • Invasive Alien Species Assessment
      • Sustainable Use Assessment
      • Values Assessment
      • Global Assessment
    • Assessment Directories
      • Underlying bibliographic data and research materials of the IPBES assessment reports
      • Thematic assessment report on Invasive Alien Species and their Control
      • First global assessment report on biodiversity and ecosystem services
  • Linked Open Data
    • IPBES Ontology
  • Repositories
    • GitHub
    • Zenodo
    • ORCID
  • Reference Manager
    • Zotero
      • Zotero administration
  • Literature access
    • Research4Life
    • Open access literature
  • Mailing and messaging
    • Microsoft Outlook
      • Quick Start Guide
    • Mailchimp
    • Slack
  • Collaboration
    • Microsoft Teams
      • Quick Start Guide
      • Joining Teams & Channels
      • Files and documents
      • Meetings
      • Chat
      • Troubleshooting Teams
    • Microsoft SharePoint
      • Quick Start Guide
      • Sign in to SharePoint
      • Collaborate in SharePoint
    • Microsoft OneDrive
      • Quick Start Guide
      • Manage files
      • Sync files
      • Collaborate
      • Work on the go
    • Google Groups
  • Website
    • IPBES Website
    • Navigation
    • Search
    • Forms
    • TRACK
    • TEST
    • Content management
      • Content creation
      • Content administration
Powered by GitBook

Copyright © 2023 Intergovernmental Platform on Biodiversity and Ecosystem Services (IPBES), All rights reserved.

On this page
  • I. Overview of Pallets:
  • A Types of Pallets:
  • B. Colour Blind Friendly Palettes
  • C. No rainbow colour palettes
  • II. RColorBrewer in R and Examples
  • A. RColorBrewer
  • B. Hexadecimal
  • C. Examples
  • III. Suggestions
  • IV. Additional Resources

Was this helpful?

Export as PDF
  1. Data and Knowledge Management
  2. Technical Guideline Series

Part 4 - Guidelines for Colour

Technical Guideline Series

PreviousPart 3 - Cartographic GuidelinesNextPart 5 - File formats

Last updated 1 year ago

Was this helpful?

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

Version: 1.2 Last Updated: 9 November 2023

DOI:

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:

library(RColorBrewer)
library(ggplot2)
library(sf)
library(rnaturalearth)

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 or about ). 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:

C. No rainbow colour palettes

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:

RColorBrewer::display.brewer.all()

To display all of the colourblind friendly palettes run this:

RColorBrewer::display.brewer.all(colorblindFriendly = TRUE)

If you would like to visualise a specific palette, specify the number of colours and the palette name.

RColorBrewer::display.brewer.pal(n = 5, name = 'YlOrRd')

B. Hexadecimal

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:

RColorBrewer::brewer.pal(n = 5, name = "YlOrRd")

## [1] "#FFFFB2" "#FECC5C" "#FD8D3C" "#F03B20" "#BD0026"

We could then call those specific colours in a plot, as opposed to using general names like “blue” or pre-set palettes.

C. Examples

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.

land <- ne_countries(scale = 110, returnclass = "sf") # Downloads land polygons 
cities <- read_sf("ne_110m_populated_places.shp") # Downloads the large cities points dataset

robin <- "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"# Defines Projection 

# Converts to Robinson
land <- st_transform(land, crs = robin)
cities <- st_transform(cities, crs = robin)

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.

ggplot(cities) +
  geom_sf(data = land, # adds land for reference
          col = NA,
          fill = "gray60") +
  geom_sf(aes(color = POP_MIN/1000000)) + # Assigns the colour of the large cities to their minimum population size
  scale_color_gradient( # used with continuous data
    low = "#FFFFB2", 
    high = "#BD0026") +
  labs(color = "Population (millions)") +
  theme(legend.position = "bottom", # Places legend on the bottom 
        panel.background = element_blank(), # controls the background panel colour 
        panel.grid.major = element_line(color = "grey80")) # controls the grid line colour 

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.

ggplot(land) +
  geom_sf(aes(fill = continent, color = continent)) + # Fill and colour are the same to effective remove borders
  scale_color_brewer(palette = "Dark2") + # Uses a RColorBrewer palette
  scale_fill_brewer(palette = "Dark2") +
   theme(legend.position = "bottom", 
        legend.title = element_blank(),
         panel.background = element_blank(), 
        panel.grid.major = element_line(color = "grey80")) 

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

, open source for Mac and iOS, to simulate various types of colour blindness

, 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)

, real-time simulations of red-green colour-blindness for Windows.

There is also an R-package () which provides a collection of safe colours for various types of figures and maps.

Rainbow colour schemes are interpreted by humans to have sharp artificial boundaries that are not representative of the underlying data. 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 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.

provides a great overview on how to use the RColorBrewer package with these palettes integrated with ggplot with examples.

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.” -

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 . These are just example datasets whose accuracy has not been checked.

R Colour Sheet:

Useful tool to assist in picking palettes and colours:

Tool to visualise colours as someone with different types of colour blindness:

colourBlindness Package guide:

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
10.5281/zenodo.6838820
colour palettes and colour blindness
colour schemes and contrasts
Sim Daldonism
Color Oracle
ColourSimulations
colorBlindness
with its own guide
Crameri et al. 2020 covers
this article
This article
R colour cheatsheet
here for free download
https://www.nceas.ucsb.edu/sites/default/files/2020-04/colorPaletteCheatsheet.pdf
https://colorbrewer2.org/
https://davidmathlogic.com/colorblind/#%23D81B60-%231E88E5-%23FFC107-%23004D40
https://cran.r-project.org/web/packages/colorBlindness/vignettes/colorBlindness.html
aidin.niamir@senckenberg.de