Creating your own custom colour palette in Tableau

Tableau Desktop comes with a variety of colour palettes that have been carefully designed and curated to work well together and apply colour to data effectively. But sometimes you need to create your own colour palette, in example for a customer or your own preferences. By modifying the Preference.tps file you can create and use your own colour palette!

You can add as many custom colour palettes as you want. Each one with as many colours as you want. But the edit colours box on Tableau only shows up to 20 colours. So remember to create your custom colour palette with 20 colours or less.

Use the standard HTML format for your new colours. I would also recommend the hex code (#RRGGBB). To use your custom colour palette simply restart Tableau Desktop. Afterwards your newly added colour palette should appear in the Select Colour Palette drop-down list. Make sure to always save a back up version of your workbook before implementing new colours!

You can create 3 kinds of colour palettes: categorical (type="regular"), sequential (type="ordered-sequential"), or diverging (type="ordered-diverging").

Categorical colour palettes contain distinct colours that can be assigned to discrete dimensions. A sequential palette is used for continuous fields. It shows a single colour which varies in intensity. You have to specify at least two end colours for your sequential colour range. The shades in between will be extrapolated by Tableau. The last type is a diverging colour palette. Instead of one gradient you will have two diverging colours sequences, like a range from red to blue. They are commonly used to show the difference between positive and negative numbers.


The Preference.tps file is located in your My Tableau Repository folder in your Documents directory. Open the file with a text editor. Your unedited preference file should look like this:

<?xml version='1.0'?>

<workbook>

</workbook>

Now we are adding the preference tags, so we could insert and use our own colours palettes:

<?xml version='1.0'?>

<workbook>

<preferences>

</preferences>

</workbook>

Let us add one custom palette for each category. Choose two hex codes for your custom palette, give it a name and set the type to regular. The preference file should now look like this:

<?xml version='1.0'?>

<workbook>

<preferences>

<color-palette name="My Regular Palette" type="regular">

<color>#a18cbb</color>

<color>#8cbbb8</color>

</color-palette>

</preferences>

</workbook>

If you want to add more colours, make sure to always use the tag <color>#RRGGBB</color>.

Let us add a sequence with at least two colours:

<color-palette name="My Sequential Palette" type="ordered-sequential">

<color>#a18cbb</color>

<color>#302a38</color>

</color-palette>

And add a diverging palette

<color-palette name="My Diverging Palette" type="ordered-diverging">

<color>#a18cbb</color>

<color>##ffd073</color>

</color-palette>

Your preference file should look something like this now:

<?xml version='1.0'?>

<workbook>

<preferences>

<color-palette name="My Regular Palette" type="regular">

<color>#a18cbb</color>

<color>#8cbbb8</color>

</color-palette>

<color-palette name="My Sequential Palette" type="ordered-sequential">

<color>#a18cbb</color>

<color>#302a38</color>

</color-palette>

<color-palette name="My Diverging Palette" type="ordered-diverging">

<color>#a18cbb</color>

<color>##ffd073</color>

</color-palette>

</preferences>

</workbook>

Save the preference file and open one of your workbooks inTableau Desktop to have a look at your new custom colour palettes. Remember to restart Tableau after editing your preference file!

Go to Colour and within the Select Colours Dropdown menu you should see your newly created palettes.

Like I said. You only need two colours for your sequence. Tableau will fill in the rest.


Where can you get the hex codes for the colours? A customer could give you a list with their corporate colours. Or you can just use an online colour picker website like: https://imagecolorpicker.com/

You can pick a colour from one of your own images, a website or your screen. The side will show you the hex code, intensity variations and complementary colours.

Websites like https://mycolor.space/ will generate a palette for you based on a chosen hex code.

Author:
Birthe Claussen
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab