Using colour in a visualisation

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Using colour in a visualisation

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student's dashboard uses 12 different bright colours for one chart. What is the better choice?
A Add even more colours so it looks lively
B Use a small palette of a few colours
2. Your bar chart shows Sales, Support and Admin in blue, green and orange. On the next chart in the same report, which choice is better?
A Keep Sales blue, Support green and Admin orange
B Swap the colours so each chart looks different
3. Which statement about colour in a visualisation is correct?
A Each colour in the palette should have one clear meaning
B Colours should be picked at random for variety
4. A map uses only red and green to show 'fail' and 'pass'. How can you make it easier for colour-blind viewers?
A Make the red and green brighter
B Add labels, icons or patterns as well as colour
5. True or false: A red and green pairing is a colour-blind safe choice.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1palette = ["navy", "orange", "grey"] AA limited palette: a small set of colours chosen on purpose, rather than a rainbow of random colours
2Sales = blue, Costs = blue Bcolours = ["blue", "orange"]
3Colour should not be the only way to show information, so colour-blind viewers can still read the chart CSame colour for the same category in every chart, so the viewer learns what each colour means
4A colour-blind safe choice uses colours that differ in lightness, such as blue and orange, instead of red and green Dline style = solid or dashed + direct label
5Pass = green, Fail = red (no labels or symbols) EToo many colours in the palette. Reduce it to a few colours, each with one clear meaning.
6palette = [red, blue, green, pink, yellow, purple, lime, teal] FRelies on colour alone, so a red-green colour-blind viewer cannot tell Pass from Fail. Add text labels or symbols.

Definitions

colour palette

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_______ = ["navy", "orange", "grey"]
2.
_________("Sales") = "blue" bar.fill = colour_of("Sales")
3.
if len(palette) _ 5: print("Too many colours")
4.
if ___ has_labels: add_labels(chart)
5.
chart.___________("colourblind_safe")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A palette_size = 12
B colour(Sales) = navy
C colour(Costs) = orange
D label_each_bar = true
Question 2
A chart1: colour(Cats) = orange
B chart1: colour(Dogs) = grey
C chart2: colour(Cats) = green
D chart2: colour(Dogs) = grey
Question 3
A title = Pass rate
B good = green, bad = red
C add_labels = true
Question 4
A colour(Cats) = navy
B style(Cats) = dashed
C colour(Dogs) = orange
D style(Dogs) = dashed
Question 5
A colour(High) = dark_blue
B colour(Medium) = mid_blue
C colour(Low) = pink
D legend = true

Answer Key

Using colour in a visualisation
Section A: Quick Questions
Q1
B — Use a small palette of a few colours
Q2
A — Keep Sales blue, Support green and Admin orange
Q3
A — Each colour in the palette should have one clear meaning
Q4
B — Add labels, icons or patterns as well as colour
Q5
A — False
Section B: Match the Pairs
Q1
palette = ["navy", "orange", "grey"] → A limited palette: a small set of colours chosen on purpose, rather than a rainbow of random colours
Q2
Sales = blue, Costs = blue → Same colour for the same category in every chart, so the viewer learns what each colour means
Q3
Colour should not be the only way to show information, so colour-blind viewers can still read the chart → line style = solid or dashed + direct label
Q4
A colour-blind safe choice uses colours that differ in lightness, such as blue and orange, instead of red and green → colours = ["blue", "orange"]
Q5
Pass = green, Fail = red (no labels or symbols) → Relies on colour alone, so a red-green colour-blind viewer cannot tell Pass from Fail. Add text labels or symbols.
Q6
palette = [red, blue, green, pink, yellow, purple, lime, teal] → Too many colours in the palette. Reduce it to a few colours, each with one clear meaning.
Section C: Definitions
Q1
colour palette — A small, consistent set of colours where each colour has one meaning. Use the same colour for the same category, and never rely on colour alone, so colour-blind viewers can still read it.
Section D: Fill in the Blanks
Q1
palette = ["navy", "orange", "grey"]
Q2
colour_of("Sales") = "blue" bar.fill = colour_of("Sales")
Q3
if len(palette) > 5: print("Too many colours")
Q4
if not has_labels: add_labels(chart)
Q5
chart.set_palette("colourblind_safe")
Section E: Spot the Error
Q1
A — A palette should be small. Twelve colours is too many to tell apart or remember. It should be about 3, as in the correct line.
Q2
C — The same category must keep the same colour in every chart. Cats is orange in chart1, so it must stay orange in chart2, not change to green.
Q3
B — Red and green look alike to many colour-blind viewers. Use a colour-blind safe pair such as blue and orange: good = blue, bad = orange.
Q4
B — Both lines now share the same style, so colour is the only difference. Colour should not be the only way to carry information. Cats should keep a different style, such as solid.
Q5
C — Pink adds a colour outside the limited palette and breaks the dark-to-light blue scale. Low should be light_blue so the shades stay consistent.