Alteryx

Custom colors in Tableau

How to add custom color pallets in Tableau

Often when making visualizations with Tableau it is of interest to disaggregate a measure into finer categories based on a dimension. One of many ways to do this is through coloring, such as below.

For a quick explorative analysis, the formatting and coloring may not matter much. However every so often the visualizations and insights are to be presented for somebody else. In this kind of situation, nice formatting might be of high value. This is where custom colors becomes relevant.

Tableau comes native with a large set of color pallets but sometimes this is not enough.

Occasionally you want the colors to match the exact assignment you are working on, or there might be a desire to follow a firms design guidelines.

When creating a custom color pallet the first thing you will need is the colors you want. In this context Tableau requires HEX-colors to do the job. HEX is a certain kind of format that expresses an exact color. If you are not already provided with the HEX coloring you can convert standard RGB colors through many applications and websites including the following: //www.rgbtohex.net.

So at this point you have a list of HEX-colors which needs to be added to Tableau as a new color pallet.

Tableau allows an infinite amount of custom color pallets, with a maximum of 20 colors in each.

I have the following colors and HEX combinations:

87AA14 #F8B39B #ED9D97 #FBD199

FFE168 #FBF6A7 #E8EFA6 #BADBAB

7BCFA9 #94D8E8 #A0C3FF #A8B5D8

C5A5CF #D799AE #AB948C #F2F2F2

The first thing you need, is to locate the Tableau Preference file. The usual directory to the file is

My Documents -> My Tableau Repository -> Preferences.tps

When the file is located make sure to close down Tableau. Now open the preference file through Notepad.

The file should look like this:

<?xml version=’1.0’?><workbook></workbook>Now to add your custom color pallet you edit the preference file as follows:<?xml version=’1.0’?><workbook><preferences><color-palette name=”Custom Tableau Colors” type=”regular” ><color>#87AA14 </color><color> #F8B39B </color><color> #ED9D97 </color><color> #FBD199 </color><color> #FFE168 </color><color> #FBF6A7 </color><color> #E8EFA6 </color><color> #BADBAB </color><color> #7BCFA9 </color><color> #94D8E8 </color><color> #A0C3FF </color><color> #A8B5D8 </color><color> #C5A5CF </color><color> #D799AE </color><color> #AB948C </color><color> #F2F2F2 </color></color-palette></preferences></workbook>

Summarizing the above, you simply paste the hex color code in between the color brackets and save the preference file.

Your custom color pallet will now be available the next time Tableau is launched.


Back to blog


Subscribe for updates