Colour, or color, depending on where you are from, is essential to Tableau dashboard design. Tableau has its own colour palettes that does well but sometimes you may want to change it up to suit your style or match a theme. After dashboard week, I realised that I wanted to improve on dashboard design, specifically the use of colours on a Tableau dashboard and learned how to create custom colour palettes in Tableau in the process.

How to Add Custom Colour Palettes – to keep on you arsenal of colour palettes

Leona Lai, another Data Schooler from DSAU6, had also created a guide here and she also explains the different types of colour palettes (regular, ordered-sequential and ordered-diverging), so I recommend checking out that blog as well.

Step 1: Open the Preferences.tps on Notepad

It is located in Documents > My Tableau Repository.¬†Right-click the Preferences.tps file and select¬†Open with > Notepad (may need to select the ‘Choose another app’ option to find Notepad)


Step 2: Type in <preferences> and </preferences> between the <workbook> and </workbook>

If you don’t fully understand what XML tags then think of these tags as opening and closed brackets. <preferences> is the opening bracket and </preferences> is the closing bracket (as shown in the yellow highlighted text). The custom colour palettes go inside here.

Step 3: Add your Custom Colour Palette inside the ‘preferences’ tags

In between the tags, you can see the green highlighted text in the screenshot is the colour palette in with the palette name, type and each individual colour in its hex colour code.

You can use Tableau Magic to generate a colour palette of your favourite picture and it will automatically generate the colour palette code for Tableau that you could copy and paste which I used in this example using a painting called Anxiety by Edvard Munch whom is most know for ‘The Scream’.

Step 4: Save and Restart your Tableau

Save the Preferences.tps file and open up Tableau (you may need to restart Tableau to update it) to see it in your palettes.

How to Select Custom Colours on Tableau – for one-off uses

For those who don’t need to save the colour that they are using and are just utilising it for one dashboard then you can still use custom colours for specific data items.

Step 1: Go to the Edit Colours… Menu

Step 2: Double click the coloured box next to the data item you want to change

Step 3: Enter the hex number or use a the colour picker tool (highlighted in the red boxes below)

Useful resources about colour palettes in Tableau:

  • Tableau Magic Color Palette Generator: This is a great starting point where you can import your favourite image and it will automatically prepare the text required to put in the Preference.tps file
  • Adobe Color: also allows you to use an image to create a colour palette from but it is great at selecting different colour schemes on the image and choosing specific spots on the image to obtain the colour from. This is my personal favourite to use.
  • Canva Color Palette Generator: like the previous 2 it also generates a colour palette from an image but it also has a fantastic gallery of different colour combinations
  • 80 Eye-Catching Color Combinations for 2021!: provides some wonderful colour combinations that you may want to use
  • PokePalettes: BONUS! for the Pokemon fans out there where you can get a colour palettes of your favourite Pokemon from Generation I to Generation V
  • 5 tips on designing colorblind-friendly visualizations: something to consider when you use colours in your dashboards for those with colour blindness
Kier Bituin
Author: Kier Bituin