Quick Tips / Viz Musings · February 10, 2022 0

Why Background Colours Matter In DataViz

One of the design choices that you have to make when creating a visualisation is what colours to use, and in particular, do you go for a light foreground and dark background or vice versa. On the face of it, this can be thought of as just an aesthetic design decision, but in fact, it has some real implications that need to be considered. 

There are many things that can determine the colours used in a viz. I talked about this in my #data15 talk on colour. Sometimes it’s the theme of the data. If it’s a ‘dark’ subject then that lends itself to be a dark background and muted colours. If it’s a fun poppy viz then bright candy colours work well. 
We always want to make or data viz look awesome and beautiful, but first and foremost it must be an accurate representation of the data, and this is where we have to consider the correct use of dark backgrounds.

The issue is that it’s harder to see small, faint light marks on a dark background than it is with a dark mark on a light background. This is something that Astronomers have known for years. 25 years ago (damn) I was an undergraduate studying for a degree in Astrophysics and spent a lot of time looking at images of star fields. More often than not you would be looking for faint galaxies or nebulae and it was much more effective to look at a negative image. Check out these two images below, the only thing that is different is one is the negative of the other. 

See how you can see a lot more detail in the lower image. imagine if you have data points that are there but faint and they get missed?

Here’s an example made in Tableau. Each row has 100 points, all sized in the same way, the only difference is the reverse of the colour gradient. Notice that the light on black fade out a lot earlier. Try playing with the sliders for the reference line and see how much of a difference it makes

Now I am not saying you shouldn’t use a dark background, just that if you do, make sure you can see all the marks.