London City Data

Colour foundations

Carefully considered colours for data visualisation

Principles

Balancing the requirements of accessibility, personal perception, system preferences, cultural association and branding is difficult to get right.

Follow these principles

  • Colours should be easily differentiated by as many people, in as many environments as possible.

  • Colours should have appropriate levels of contrast with the background. The smaller the element, the higher the contrast required.

  • Use a single colour that highlights your key data, and grey for secondary contextual data.

  • Only use a second or third categorical colour if direct comparison of data is required.

  • Don’t use more than 2 or 3 categorical colours. Consider labelling, line styling or small multiples instead.

  • Keep colour meaning consistent across all charts that are likely to be read in the same context.

  • Use colour to connect information across different charts and editorial.

  • Some colours have overriding cultural, political or contextual meaning. Try and reserve those if you’ll need them later in your presentation. E.g. Red = Bad, Failing or Hot, Green = Good, improving or Environment, Blue = cold, etc...

Practice

Categorical colours

Categorical (or qualitative) colours are used to identify and differentiate data that has no particular order or value. For example, a set of London boroughs, industry types or groups of people.

Categorical colours should be as visually differentiable as possible, and maintain a high level of contrast with their background.

Our categorical colours

We developed our categorical colour palettes by carefully balancing the requirements of GLA brand recognition, colour differentiation and contrast.

Switching between our light and dark categorical palettes is easy, because they have a consistent colour naming scheme (categorical-blue, red, green, etc).

Categorical palette

Mode

These categorical colours pass differentiation tests for all but small lines, but don't use them all in a single chart.

Considering contrast ratios in your colour choices

When selecting colours directly from the categorical palette, choose as few as possible, and prioritise colours with higher contrast ratios (4.5:1+).

Colour differentiation is harder when elements are smaller, as there is physically less colour to see.

Using high contrast and easily differentiable colours are particularly important when producing line charts. For bar charts and other larger graphical elements, you can lower your contrast a bit.

As with large text, for graphical objects such as charts and graphs a contrast ratio of 3:1 should be sufficient

WCAG Guidelines

Read more on WCAG Guidelines

Example

Line chart of London variable values

The stacked bar chart shows yearly average data in 2015 vs 2021 for Variable A, B and C, measured in GBP (Pounds Sterling). The x axis ranges from £0 to £100,000. The y axis shows 2015 and 2021. The combined annual average for all variables was £105,503 in 2015 compared to £66,820 in 2021 (a change of around -£38,683). Variable A had the most significant change of -£19,328 in 2021 vs 2015.

Semantic data colours

We've created semantic tokens to simplify and standardise the use of our colours.

Semantic colour tokens

Mode

Prioritisation

We recommend you consistently use color-data-primary, secondary and tertiary in your charts, unless you have a specific reason for choosing a different set.

These colours are easily differentiated, and have an equivalent set in dark mode.

Example

Line chart of London variable values

The line chart shows monthly time series data for Variable A, B and C, measured in GBP (Pounds Sterling). The x axis ranges in months from January 2015 to March 2024. The y axis ranges from £0 to £60,000. All variable values have fallen steadily since around 2017, but Variable A has fallen the most. Variable A's highest value was £61,816 in February 2015, its lowest value was £11,667 in July 2023, (a change of around -£50,149) and its mean average value was £30,758. Variable B and C follow a similar fall, with a mean average of £27,545 and £23,681 respectively.

For charts where you want to show "other" or "context" data, use color-data-primary and color-data-context.

Example

Line chart of London variable values

The line chart shows monthly time series data for Variable A and B, measured in GBP (Pounds Sterling). The x axis ranges in months from January 2015 to March 2024. The y axis ranges from £0 to £60,000. All variable values have fallen steadily since around 2017, but Variable A has fallen the most. Variable A's highest value was £61,816 in February 2015, its lowest value was £11,667 in July 2023, (a change of around -£50,149) and its mean average value was £30,758. Variable B follows a similar fall, with a mean average of £27,545.

Demographics

When representing sex in your demography data, use color-data-male and color-data-female. The Purple and Green is a tribute to the Suffragette flag (and a great idea we borrowed from the Telegraph style guide).

Opinion

If you are visualising diverging data (like opinion research) or want to explicitly show if something is good or bad, then use color-data-positive, and color-data-negative.

We've chosen blue and red to represent good and bad, to avoid the common red/green colour differentiation issue.

It's also useful to have a couple of neutral grey's for "neither" and "don't know". Here you can use color-data-neutral-0 and color-data-neutral-1.

Missing data

Sometimes you need to show missing (or filtered out) data. Here you can use color-data-empty.

Chart styling

To ensure consistency and correct contrast across all charts, use the following tokens to define your chart's surface, axis, grid and labels.

Chart colour tokens

Mode

Further reading