The ultimate guideline to Tableau Color palettes + 5 cool custom palettes!

Patricia Gogova
4 min readFeb 3, 2024

--

Introduction

Colors. Even though they are hiding under a little icon in the Marks card it has quite big of power, right? If you’ve ever seen any work done in Tableau — it has colors (so much new information so far, right?) and you might not even realize how it influences you.

When you first start using Tableau Desktop, without any adjustments, there is a set of predefined color palettes — which you can imagine as a set of colors in a group. Or you can define your own — which is especially useful when you for example need to follow the company’s brand guidelines or just wanna play around with something… nicer.

There are three types of palettes:

  • categorical
  • sequential
  • diverging

A categorical color palette is used to represent categorical data with no inherent order - and uses distinct colors for each category.

A sequential color palette is used to represent ordered or numeric data, with a gradual progression of colors indicating increasing values.

A diverging color palette is used to visualize data with distinct positive and negative values by contrasting hues around neutral color.

Sometimes, what is predefined is enough and you can build decent visualizations. Other times, you might need / want to define your own color palettes.

How to?

When defining your own palettes, you need to use Preferences.tps file that comes with Tableau Desktop. It is located in the My Tableau Repository folder in the Documents folder. Not sure if this file is also used for something else, since I only use it for colors.

File location

To modify the file, you need to use HTML format. It is not a rocket science, you just need to make sure you paste the code in the right place — the most common mistake I’ve seen users do is putting the code outside of opening and closing tags (FYI opening tag looks like <this>, closing tag looks like </this>) or accidentally deleting one of them.

When you first open the file, it contains this:

<?xml version='1.0'?>
<workbook>
</workbook>

You need to add the preferences part to make it look like this:

<?xml version='1.0'?>
<workbook>
<preferences>
</preferences>
</workbook>

Now in between the opening <preferences> tag and closing </preferences> tag, you need to add the code for the palette you want to add. The type of the color palette you’re creating is defined by the type attribute. After adding the codes, you just need to save the file and restart Tableau Desktop.

  1. Categorical (type=”regular”)
  • contains distinct (separate) colors and is used when coloring by dimension members
<color-palette name="Categorical Palette" type="regular">
<color>#60712f</color>
<color>#7b8b99</color>
<color>#fffffc</color>
<color>#183642</color>
<color>#ff7f11</color>
</color-palette>

2. Sequential (type=”ordered-sequential”)

  • shows usually one color varying in intensity and is used when coloring measures
  • Note: You have to specify at least two variants of the color.
<color-palette name="Sequential Palette" type="ordered-sequential">
<color>#dae6fc</color>
<color>#061a40</color>
</color-palette>

3. Diverging (type=”ordered-diverging”)

  • uses color intensity and distinct colors to represent two value ranges and indicate their magnitudes and is usually used to show the difference between positive and negative numbers
<color-palette name="Diverging Palette" type="ordered-diverging">
<color>#bc4749</color>
<color>#386641</color>
</color-palette>

Few things to keep in mind:

  • even though Tableau says there are no limitations as to how many colors you can add to a color palette code, in UI it only shows 20 of them — if by any chance you need to use more than 20 colors, I would suggest creating two separate color palettes (I would suggest not using more than 20 colors in the first place :))
  • custom diverging palettes — putting white or light gray in the center might help if the palette appears dull
  • in the Preferences.tps file, use straight quotation marks, not the curly ones

5 color palettes I like:

Color palettes for Tableau

Tip: For the more colorful ones (last three) I still like to use “almost-white” for backgrounds!

Let me know if this article was useful & I'm happy to hear suggestions on what can be added!

If you like my content, consider hitting that Follow button! :)

--

--

Patricia Gogova

IronViz 2024 Finalist | Talk data to me | Practice makes progress