How to Create a Custom Colour Theme in Tableau

We have all been there. You are building a dashboard for a client with strict brand guidelines, or perhaps you just want to break away from the standard "Tableau 10" blue and orange scheme.

While Tableau offers plenty of built-in options, sometimes you need something specific. The good news is that adding your own custom colour palettes is incredibly straightforward. It requires editing a small text file, but don’t worry—you don’t need to be a developer to do it.

Here is how to create custom Categorical, Sequential, and Diverging colour themes in Tableau Desktop.


Step 1: Locate Your Repository

When you installed Tableau, it automatically created a folder on your computer called My Tableau Repository. By default, this is located in your Documents folder.

Inside this folder, look for a file named Preferences.tps. This is where the magic happens.

Step 2: Open the File

You cannot edit this file inside Tableau. You need to open it with a text editor.

  • Windows: Notepad is fine, though Notepad++ or VS Code makes it easier to read.
  • Mac: TextEdit works (ensure you are in plain text mode).

When you open it for the first time, it will look quite empty, likely just containing this:

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

If you don't have <preferences> and </preferences> written in yours yet, add it in now. We are going to write our code between the opening <preferences> tag and the closing </preferences> tag.

Here is a draft for your blog post. I have written it in the style typical of The Information Lab Data School—clear, instructional, and encouraging, with code snippets ready to copy and paste.


A Simple Guide to Custom Colour Palettes in Tableau

We have all been there. You are building a dashboard for a client with strict brand guidelines, or perhaps you just want to break away from the standard "Tableau 10" blue and orange scheme.

While Tableau offers plenty of built-in options, sometimes you need something specific. The good news is that adding your own custom colour palettes is incredibly straightforward. It requires editing a small text file, but don’t worry—you don’t need to be a developer to do it.

Here is how to create custom Categorical, Sequential, and Diverging colour themes in Tableau Desktop.


Step 1: Locate Your Repository

When you installed Tableau, it automatically created a folder on your computer called My Tableau Repository. By default, this is located in your Documents folder.

Inside this folder, look for a file named Preferences.tps. This is where the magic happens.

Step 2: Open the File

You cannot edit this file inside Tableau. You need to open it with a text editor.

  • Windows: Notepad is fine, though Notepad++ or VS Code makes it easier to read.
  • Mac: TextEdit works (ensure you are in plain text mode) or Sublime Text.

When you open it for the first time, it will look quite empty, likely just containing this:

XML

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

We are going to write our code between the opening <preferences> tag and the closing </preferences> tag.


Step 3: Choose Your Palette Type

There are three main types of palettes you can create. You will need the Hex Codes (e.g., #FF5733) for the colours you want to use.

1. The Regular Palette (Categorical)

Use this for dimensions (e.g., distinct categories like Region or Segment). The colours do not have a specific order or gradient.

The Syntax: Note the type="regular".

💡
<color-palette name="My Custom Brand" type="regular">
<color>#E45756</color>
<color>#F58518</color>
<color>#EECA3B</color>
<color>#54A24B</color>
<color>#72B7B2</color>
</color-palette>

Here is a draft for your blog post. I have written it in the style typical of The Information Lab Data School—clear, instructional, and encouraging, with code snippets ready to copy and paste.


A Simple Guide to Custom Colour Palettes in Tableau

We have all been there. You are building a dashboard for a client with strict brand guidelines, or perhaps you just want to break away from the standard "Tableau 10" blue and orange scheme.

While Tableau offers plenty of built-in options, sometimes you need something specific. The good news is that adding your own custom colour palettes is incredibly straightforward. It requires editing a small text file, but don’t worry—you don’t need to be a developer to do it.

Here is how to create custom Categorical, Sequential, and Diverging colour themes in Tableau Desktop.


Step 1: Locate Your Repository

When you installed Tableau, it automatically created a folder on your computer called My Tableau Repository. By default, this is located in your Documents folder.

Inside this folder, look for a file named Preferences.tps. This is where the magic happens.

Step 2: Open the File

You cannot edit this file inside Tableau. You need to open it with a text editor.

  • Windows: Notepad is fine, though Notepad++ or VS Code makes it easier to read.
  • Mac: TextEdit works (ensure you are in plain text mode) or Sublime Text.

When you open it for the first time, it will look quite empty, likely just containing this:

XML

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

We are going to write our code between the opening <preferences> tag and the closing </preferences> tag.


Step 3: Choose Your Palette Type

There are three main types of palettes you can create. You will need the Hex Codes (e.g., #FF5733) for the colours you want to use.

1. The Regular Palette (Categorical)

Use this for dimensions (e.g., distinct categories like Region or Segment). The colours do not have a specific order or gradient.

The Syntax: Note the type="regular".

XML

<color-palette name="My Custom Brand" type="regular">
    <color>#E45756</color>
    <color>#F58518</color>
    <color>#EECA3B</color>
    <color>#54A24B</color>
    <color>#72B7B2</color>
</color-palette>

2. The Sequential Palette

Use this for continuous measures where you want a gradient from light to dark (e.g., Sales 0 to Sales 100k).

The Syntax: Note the type="ordered-sequential". You usually only need to provide the start and end colour; Tableau handles the gradient between them.

💡
<color-palette name="My Custom Blue Gradient" type="ordered-sequential">
<color>#D1E5F0</color>
<color>#2166AC</color>
</color-palette>

Here is a draft for your blog post. I have written it in the style typical of The Information Lab Data School—clear, instructional, and encouraging, with code snippets ready to copy and paste.


A Simple Guide to Custom Colour Palettes in Tableau

We have all been there. You are building a dashboard for a client with strict brand guidelines, or perhaps you just want to break away from the standard "Tableau 10" blue and orange scheme.

While Tableau offers plenty of built-in options, sometimes you need something specific. The good news is that adding your own custom colour palettes is incredibly straightforward. It requires editing a small text file, but don’t worry—you don’t need to be a developer to do it.

Here is how to create custom Categorical, Sequential, and Diverging colour themes in Tableau Desktop.


Step 1: Locate Your Repository

When you installed Tableau, it automatically created a folder on your computer called My Tableau Repository. By default, this is located in your Documents folder.

Inside this folder, look for a file named Preferences.tps. This is where the magic happens.

Step 2: Open the File

You cannot edit this file inside Tableau. You need to open it with a text editor.

  • Windows: Notepad is fine, though Notepad++ or VS Code makes it easier to read.
  • Mac: TextEdit works (ensure you are in plain text mode) or Sublime Text.

When you open it for the first time, it will look quite empty, likely just containing this:

XML

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

We are going to write our code between the opening <preferences> tag and the closing </preferences> tag.

Step 3: Choose Your Palette Type

There are three main types of palettes you can create. You will need the Hex Codes (e.g., #FF5733) for the colours you want to use.

1. The Regular Palette (Categorical)

Use this for dimensions (e.g., distinct categories like Region or Segment). The colours do not have a specific order or gradient.

The Syntax: Note the type="regular".

XML

<color-palette name="My Custom Brand" type="regular">
    <color>#E45756</color>
    <color>#F58518</color>
    <color>#EECA3B</color>
    <color>#54A24B</color>
    <color>#72B7B2</color>
</color-palette>

2. The Sequential Palette

Use this for continuous measures where you want a gradient from light to dark (e.g., Sales 0 to Sales 100k).

The Syntax: Note the type="ordered-sequential". You usually only need to provide the start and end colour; Tableau handles the gradient between them.

XML

<color-palette name="My Custom Blue Gradient" type="ordered-sequential">
    <color>#D1E5F0</color>
    <color>#2166AC</color>
</color-palette>

3. The Diverging Palette

Use this for measures that have a midpoint, like Profit (Negative to Positive) or Year-over-Year growth.

The Syntax: Note the type="ordered-diverging". You typically provide three colours: Start, Midpoint (often white or light grey), and End.

💡
<color-palette name="My Custom Red-Blue Diverging" type="ordered-diverging">
<color>#B2182B</color>
<color>#F7F7F7</color>
<color>#2166AC</color>
</color-palette>

Step 4: Save and Restart

This is the most important step.

  1. Save your Preferences.tps file.
  2. Close and Restart Tableau Desktop.

Tableau only reads the preferences file upon startup. If you don't restart, your new colours won't appear.

Step 5: Use Your Palette

Once you have restarted:

  1. Drag a field onto Colour.
  2. Click Edit Colours.
  3. In the dropdown menu named "Select Color Palette," scroll to the very bottom.
  4. You will see your custom palette names listed there.

Summary (The Full Code)

Here are a few themes to get you going! If you want to copy and paste a full example into your file to test it out, here is how your Preferences.tps file should look:

💡
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="Botanical Blend" type="regular">
<color>#3B5334</color>
<color>#6E8F57</color>
<color>#AFCF87</color>
<color>#D1E8BE</color
<color>#7F4F24</color>
<color>#C69C72</color>
</color-palette>

<color-palette name="Pastel Bloom" type="regular">
<color>#F6D1D1</color>
<color>#FBE4D9</color>
<color>#FFF4CC</color>
<color>#E6F4D8</color>
<color>#DDEBF7</color>
<color>#E3DFF5</color>
</color-palette>

</preferences>
</workbook>

Load these in, try them out, then start creating your own!

-- Tyler

Author:
Tyler Green
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