Level Up: Custom Tableau Color Palettes

A custom color palette in tableau

In this Level Up post, I’ll show you how to configure your preferences.tps file to add custom Tableau color palettes.

The Level Up series is designed to take Tableau beginners from out-of-the-box functionality to the next level of design and analytics, and features tip and tricks to make your dashboards more professional and polished. Click here to see all posts in the series.

There are some amazing tools for designing custom Tableau color palettes that members of the data community have created, and it’s been an especially popular topic recently. (Some of my favorites: Josh Tapley’s Color Palette Generator, Brittany Rosenau’s Palette Previewer, and – just for fun – Will Sutton’s Pokemon Color Schemes). In this post, we’ll go over everything you need to know about adding custom color palettes to your Tableau install.

(Note: I’ll be going over this in Windows, but the process should be very similar on any OS where Tableau can be installed).

Locate Your Tableau Repository

Custom color palettes live inside a preferences file in your Tableau repository, so the first thing you’ll need to do is find it! When you first download Tableau, the installer puts the repository in a default location. If you’re not sure where that is, the fastest option is to search your file system for “Tableau Repository”.

(If you’re using Tableau desktop and you don’t like the location of your repository, you can cut-and-paste the folder somewhere else and use the “Repository Location” in the file menu to reset it.)

Once you’ve found your repository folder, open it up. You’ll see something like this:

Locating your tableau repository

Edit Preferences.tps

The file we’re looking for is “Preferences.tps”. If you double-click to open directly, your OS will probably try to use Tableau to open it. This won’t work – we need it to open in a text editor. Right click, select “Open With”, and open with NotePad, WordPad, or whatever plain text editor you prefer.

Editing your tableau preferences file to add custom color palettes

The first time you open this preferences file, it looks pretty sparse. The first thing we need to do is tell Tableau we’re going to be adding some of our preferences, which we do by putting in an opening and closing “preferences” tag (<preferences> and </preferences>, respectively) between the two workbook tags.

Configuring Tableau preferences to add custom color palettes

Add a Custom Color Palette

Now we’re ready to add a color palette! In the space between the two preferences tags, you can add the following code:

<color-palette name="Desert" type="regular">

	<color>#47231F</color>
	<color>#341711</color>
	<color>#752E29</color>
	<color>#ECE2CC</color>
	<color>#B2BAB2</color>
	<color>#6A8C8E</color>
	<color>#F9ECD0</color>
	<color>#461612</color>
	<color>#305057</color>
	<color>#466971</color>

</color-palette>

This will add a nice desert-y rust brown and blue palette, but you can change the hex codes to be any colors that you want in the palette. You can also change the name as desired.

Adding a custom Tableau color palette

Within one palette, you can put as many colors as you like – however, note that Tableau will only display a max of 20 colors per palette. If you want to add more color palettes, you’ll repeat the whole section of code again while still inside the <preferences> tags. Here’s what my full file looks like with two color palettes:

Adding multiple custom Tableau color palettes

Almost there! Save your file and restart Tableau. Now, when you use the drop-down color palette selector, you’ll see your new custom Tableau color palettes at the bottom of the list.

Custom color palettes in Tableau

Inspiration

Here are a couple color palettes ready to be added in between the preferences tags in preferences.tps:

A calm neutral color palette for Tableau
<color-palette name="Calm Neutrals" type="regular">

	<color>#000000</color>
	<color>#839788</color>
	<color>#EEE0CB</color>
	<color>#BAA898</color>
	<color>#BFD7EA</color>

</color-palette>
A turquoise color palette for Tableau
<color-palette name="Turquoise Ocean" type="regular">

	<color>#75DDDD</color>
	<color>#508991</color>
	<color>#172A3A</color>
	<color>#004346</color>
	<color>#09BC8A</color>

</color-palette>
A modern color palette for Tableau
<color-palette name="High Drama" type="regular">

	<color>#0C1618</color>
	<color>#004643</color>
	<color>#FAF4D3</color>
	<color>#D1AC00</color>
	<color>#F6BE9A</color>

</color-palette>

I made all of these palettes with a tool that I love for exploring color schemes, Coolors. You can generate random palettes, use an image as a base, or create/edit palettes manually.

Now that you know how to create custom Tableau color palettes, the possibilities are endless! Get started making your own, and see how many beautiful combinations you can create.

Thank you for reading! Make sure to check out the rest of the level up series before you go, and subscribe to get notified of new posts.

Let's keep in touch! New tips, tricks, and tutorials are posted about once a week - sign up to get them straight to your inbox!

I don’t spam! Read the privacy policy for more info.

2 thoughts on “Level Up: Custom Tableau Color Palettes

  1. Does this not work in the current version of Tableau Public (2023.2.0)? I have tried using several different type designations (diverging, standard, regular), and none of them appears in my color selection dropdown. I’d really like to implement this, so I am hoping I am doing something wrond.

    Thanks!

    1. Hi Tom! To the best of my knowledge, this still works in Tableau Public 2023.2.0. The two most common reasons that this might not be working are:

      1) Something is wrong in the formatting of your config file. Make sure that all the tags are intact and in the correct order – especially the color-palette, workbook, and preferences tags.

      2) You have multiple preference files and are updating the wrong one. If you accidentally installed Tableau Public in multiple locations, you could have two separate copies of the install. Try searching your computer for the preferences.tps file and making sure there is only one copy.

Leave a Reply

Your email address will not be published. Required fields are marked *