Colour Ramps in Context

“Colour ramps are used for vector and raster symbology when you need to show continuously varying colours along a colour scale”

In this module, we will explore colour ramps. QGIS ships with a number of pre-defined colour ramps, but you can also create your own. Colour ramps let you express numeric changes in a way that is easy for your eyes to interpret.

You try:

Goal: To learn where to find additional colour ramps in QGIS and where they can be used.

Data: DEM from appendix3-local-data/SRTM
Countries: from appendix1-naturalearth-data/ne.sqlite

Part 1: Rasters
Load a raster DEM
Generate a hillshade for the DEM
Place the hillshade underneath the DEM
Use a pseudocolour renderer for the DEM
Create a new colour ramp using 'wiki-tuxnux'
Make the DEM partially transparent

Part 2: Vectors
Add a countries layer
Set the layer to use a graduated colour renderer using the options on table right

Check your results:
Part 1: Once you have assigned the raster colour ramp, your map should look something like the image above (top).
Part 2: Once you have assigned the raster colour ramp, your map should look something like the image above (bottom).

Name Expectation

Palette source

cpt

Group

Top of the CPT pallettes

Palette

Meyers

Classes

10

Mode

Quantile

More about

QGIS uses the same colour ramp system wherever colour ramps are used including:

Name Value
Vector Gradient fill
Vector Shapeburst fill
Vector Categorised fill
Vector Graduated fill
Vector Heatmap
Raster Pseudocolor renderer

As well as using one of the many built-in colour ramps, you can also create your own colour ramps using the ramp editor.

Be careful when using colour ramps - colours can make information easy to understand if used wisely, but the human eye cannot easily interpret subtle colour differences so using many classes often won't improve information handover.

If you want a comprehensive collection of colour ramps, install the Colour Ramp Manager plugin and install the full CPT ramp collection.

Check your knowledge:

  1. A colour ramp is:
    1. Useful for displaying categorised data
    2. Useful for displaying continuous data
    3. Nice for making rainbow patters on your maps
  2. When working with a ramp it is best to:
    1. Have as many classes as possible
    2. Have as many similar classes as possible
    3. Have a few divergent classes

Further reading:

Click here to download the sample data for the lesson.