How to add custom colour schemes in Tableau

People are visual creatures. Tableau users even more so. In my experience of using tableau as a beginner you very quickly tire of the small selection of colour palettes available, and I often found myself wishing I could implement my own colour schemes – particularly in situations where a change in colour might aid comprehension of a viz, or help to match a specific brand. However, due to the lack of an immediately obvious option I assumed this was either impossible or somewhat beyond me. But in reality it is actually very easy and flexible if you follow these simple steps.

First, you need to find the Tableau preferences file. To find and open the Tableau preferences file follow this filepath: Documents > My Tableau Repository > Preferences.tps.

Then open it up in notepad (or any other relevant text editor). If you have never added any preferences then it should look like this:

Between the lines that say <workbook> write: <preferences> </preferences>    between these two preference lines is where all your custom colour palettes will be stored.

This is what the end result will look like:

Once you have added custom palettes to your preferences folder it will look like this (and so this is the format you should look to follow to ensure everything goes smoothly).

Each palette is arranged with its name followed by its ‘type’ in the first row. With the hex codes for each included colour then listed line by line afterwards (more on these hex codes later). The ‘type’ of palette here refers to the particular types of colour palette within tableau – standard, sequential and diverging. For each of these types the code should look like :

  • Standard:  type=”regular”
  • Sequential: type=”ordered-sequential”
  • Diverging: type=”ordered-diverging”

For regular palettes the order in which you add the colours does not matter, but for sequential and diverging palettes make sure you add the colours in order of the desired gradient.

Understanding hex codes for colours will quickly allow you to improve the look of your vizzes. Each colour has its own specific hex code and once you know the code for the colours you require it becomes very easy to attain and replicate colour schemes with exact precision. Combine this understanding with colour scheme generators (such as coolors.co) or with colours from an image tools (google is your friend here there are many effective tools) and it becomes very easy to make your vizzes look exactly how you want them to, or to imitate the style of companies/teams etc relevant to your topic.

coolors.co is a great place to generate and customise colour palettes that go together well.
Colours from image tools are easy to find through google – here demonstrating how you can easily pull colours from any image by taking the green colour #007B3A from the spectacular flag of the Seychelles

So, for example here I will put my colour scheme from coolors.co into my preferences for use in tableau. I simply need to copy the formatting of a previously added scheme (or from the included screenshots), and replace the hex codes with the codes from the colour generator.

Here you can see my new palette ‘Bumblebee’ (note that I have chosen for it to be a sequential palette, perhaps a nice choice for a bee-related map of some sort. This is an important step and easy to forget especially if you are copying and pasting).

You will need to restart tableau in order to access your new scheme but once you have done so here you can see it in action!

Happy vizzing and may all your future vizzes be vibrant.

Bonus tip: If you are in tableau and want to ensure two shades of a colour are the exact same shade you can click on the coloured square to access the colour selector and then copy and paste hex codes directly into the hex code box!

Click on the coloured square at either end of the line to enter the colour picker
Write or paste alternative codes into the box marked HTML to accurately match colours.