Was this page helpful?
Yes No

Create Custom Color Palettes

Tableau Desktop comes with color palettes that have been carefully designed to work well together and effectively apply color to data in many situations, such as on maps, heat maps, bar charts, etc. You can also create and use your own custom color palettes by modifying the Preferences.tps file that comes with Tableau Desktop. For example, you can create a custom categorical palette that matches your company's brand.

In this article

About the preferences file

You can add as many custom palettes as you like to your Preferences.tps file, each with as many colors as you want. When you modify Preferences.tps to add colors, use the standard HTML format for the new colors (hexadecimal value #RRGGBB or Red Green Blue format). When you save the workbook and restart Tableau Desktop, the color palette names you added to Preferences.tps appear in the Select Color Palette drop-down list (Edit Color dialog). You can use a new palette like you would any other.

Tableau doesn't test or support custom color palettes, so be sure to back up your workbooks before you continue. Also, there is no guarantee that custom color palettes you create will work with future Tableau Desktop upgrades.

When you edit your Preferences.tps file, be sure to use straight quotation marks (' ' or " ") to delimit the palette name and type, not curly quotation marks (“ ” or ‘ ’).

Edit the preferences file

The Preferences.tps file is located in your My Tableau Repository. The file is a basic XML file that you can open in a text editor to modify. An unedited preferences file looks like this:

To edit your preferences file:

  1. Go to the My Tableau Repository folder in your Documents directory, and open the Preferences.tps file.

  2. Between the opening and closing workbook tags, insert opening and closing preferences tags.

  1. Follow one of the next three procedures to create a custom color palette.

Create custom color palettes

ClosedCreate a custom categorical color palette
Create a custom categorical color palette

A categorical color palette contains several distinct colors that can be assigned to discrete dimension members. For example, when you put a discrete dimension such as Region on the Color card, the categorical color legend is used.

The following is an example of what to add between the preferences tags to add a categorical color palette. Note that the type attribute is specified as regular, which identifies this palette as a categorical palette.

To create a custom categorical color palette:

  1. In the Preferences.tps file, between the "preferences" tags, paste the following. Be sure to use straight quotation marks, not curly quotation marks, to delimit the palette's name and type.

    <color-palette name="My Categorical Palette" type="regular" >
    <color>#eb912b</color>
    <color>#7099a5</color>
    <color>#c71f34</color>
    <color>#1d437d</color>
    <color>#e8762b</color>
    <color>#5b6591</color>
    <color>#59879b</color>
    </color-palette>

  2. Save the Preferences.tps file and then restart Tableau Desktop.

  3. Open a data source, such as the Superstore - Sample data source.

  4. From the Dimensions pane, drag a discrete dimension, such as Region, to Color.

  5. Click the color legend menu arrow and select Edit Colors.

  1. In the Edit Colors dialog box, from the palette drop-down list, select your new custom palette.

  1. Click the Assign Palette button to assign the custom colors to each respective field.

  2. Click OK.

ClosedCreate a custom sequential color palette
Create a custom sequential color palette

Another type of palette is the sequential color palette. Typically, this type of palette shows a single color, varying in intensity. This type of color palette is used for continuous fields, typically for measures.

The following is an example of what to add between the preferences tags to add a sequential color palette. Note that the type attribute is specified as ordered-sequential, which identifies this palette as a sequential palette. Also, for sequential palettes you must specify at least two variants of the color in the sequential color range.

To create a custom sequential color palette:

  1. In the Preferences.tps file, between the preferences tags, paste the following. Be sure to use straight quotation marks, not curly quotation marks, to delimit the palette's name and type.

    <color-palette name="My Sequential Palette" type="ordered-sequential" >
    <color>#eb912b</color>
    <color>#eb9c42</color>
    <color>#ebad67</color>
    <color>#eabb86</color>
    <color>#eacba8</color>
    <color>#ebd8c2</color>
    </color-palette>

  2. Save the Preferences.tps file and then restart Tableau Desktop.

  3. Open a data source, such as the Superstore- Sample data source.

  4. From the Measures pane, drag a measure (such as Sales) to Color.

  5. Click the color legend menu arrow, and select Edit Colors.

  6. In the Edit Colors dialog box, from the palette drop-down list, select your custom palette.

  7. If you want each color gradation to be defined within a box, select the Stepped Color check box, and in the Steps text box, type the number of color steps you want to display in the bar.

  8. Click the Advanced button.

  9. Select the Start check box, and in the text box, type the low end number you want for the continuum.

  10. Click the Apply button to see the result, and make adjustments as needed. The color will range from high to low intensity (or the reverse) based on the order you specify in the Preferences.tps file. The default for sequential color palettes in Tableau is to make the high end of the continuum intense and the low end pale, though selecting the Reversed check box will do the opposite.

ClosedCreate a custom diverging color palette
Create a custom diverging color palette

The third type of color palette is a diverging color palette. A diverging palette shows two ranges of values using color intensity to show the magnitude of the number and the actual color to show which range the number is from. Diverging palettes are most commonly used to show the difference between positive and negative numbers.

The following is an example of what to add between the preferences tags to add a diverging color palette. Note that the type attribute is specified as ordered-diverging, which identifies this palette as a diverging palette.

To create a custom diverging color palette:

  1. In the Preferences.tps file, between the preferences tags, paste the following. Be sure to use straight quotation marks, not curly quotation marks, to delimit the palette's name and type.

    <color-palette name="My Diverging Palette" type="ordered-diverging" >
    <color>#eb912b</color>
    <color>#59879b</color>
    </color-palette>

  2. Save the Preferences.tps file and then restart Tableau Desktop.

  3. Open a data source, such as the Superstore - Sample data source.

  4. Click the Assign Palette button. The colors in the palette are used in the order they appear in the Preferences file.

If you add a sequential or diverging palette, remember to change the "type" attribute from "regular" to one of the following:

  • ordered-sequential
  • ordered-diverging
Closed(Optional): Assign a default custom palette to dimensions and measures and publish as a data source
(Optional): Assign a default custom palette to dimensions and measures and publish as a data source

After you save the workbook, the custom color palette information is embedded in the workbook (for Excel and text file-based workbooks, in the .twbx) and therefore only available for that workbook. This means that colors that are in use are shown for anybody opening the that particular workbook. If they don't have the modified preferences file, they can't use the color information for any new color encoding.

To allow new color encoding using the custom color palette or to standardize a custom color palette for the Tableau workbooks in your organization, you can create the custom color palette using one of the options above, and then publish it as a Tableau Server data source.

  1. On the same computer from which you modified the Preferences.tps file, open Tableau Desktop.

  2. Open the Superstore - Sample data source.

  3. Right-click a field in the Data pane, and select Default Properties > Color.

  4. In the Edit Colors dialog box, associate the field values with the custom color palette, and then click OK when finished.

  5. From the Data menu, select the data source, select Publish to Server, and then complete process to publish the data source.

After publishing the data source to Tableau Server, connect any new workbooks to this data source to use the custom color palette.

Use discontinued (classic) color palettes

In version 10.0, Tableau created new color palettes, updated some existing ones (such as Tableau 10 and Tableau 20), and discontinued others. If you want to keep using a color palette that was discontinued, you can edit your Preferences.tps file to add the hex values for the palette. You can add as many color palettes as you like. See Hex values for discontinued color palettes and Restore a discontinued (classic) palette for details.

Hex values for discontinued color palettes

The table below lists discontinued color palettes, along with the XML code and hex values you can use in your Preferences.tps file to restore them. If you use the code as-is, palette names will start with Classic to indicate that they're from version 9.3 and earlier. In many cases, there are updated versions of color palettes that have been discontinued. See the "Details" column for specifics.

Version 9.x palette name Details Version 9.x HEX Values

Tableau 10

Named Tableau Classic 10 in version 10.0 and higher.

<color-palette name="Classic 10" type = "regular">
<color>#17becf</color> <color>#bcbd22</color> <color>#7f7f7f</color> <color>#e377c2</color> <color>#8c564b</color> <color>#9467bd</color> <color>#d62728</color> <color>#2ca02c</color> <color>#ff7f0e</color> <color>#1f77b4</color>
</color-palette>

Tableau 10 Medium

Named Tableau Classic Medium in version 10.0 and higher.

<color-palette name="Classic 10 Medium" type = "regular">
<color>#6dccda</color> <color>#cdcc5d</color> <color>#a2a2a2</color> <color>#ed97ca</color> <color>#a8786e</color> <color>#ad8bc9</color> <color>#ed665d</color> <color>#67bf5c</color> <color>#ff9e4a</color> <color>#729ece</color>
</color-palette>

Tableau 10 Light

Discontinued.

 

<color-palette name="Classic 10 Light" type = "regular">
<color>#9edae5</color> <color>#dbdb8d</color> <color>#c7c7c7</color> <color>#f7b6d2</color> <color>#c49c94</color> <color>#c5b0d5</color> <color>#ff9896</color> <color>#98df8a</color> <color>#ffbb78</color> <color>#aec7e8</color>
</color-palette>

Tableau 20

Named Tableau Classic 20 in version 10.0 and higher.

<color-palette name="Classic 20" type = "regular"> <color>#9edae5</color> <color>#17becf</color> <color>#dbdb8d</color> <color>#bcbd22</color> <color>#c7c7c7</color> <color>#7f7f7f</color> <color>#f7b6d2</color> <color>#e377c2</color> <color>#c49c94</color> <color>#8c564b</color> <color>#c5b0d5</color> <color>#9467bd</color> <color>#ff9896</color> <color>#d62728</color> <color>#98df8a</color> <color>#2ca02c</color> <color>#ffbb78</color> <color>#ff7f0e</color> <color>#aec7e8</color> <color>#1f77b4</color>
</color-palette>

Gray 5

Discontinued.

Check out Seattle Grays in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Gray 5" type = "regular"> <color>#cfcfcf</color> <color>#8f8782</color> <color>#414451</color> <color>#a5acaf</color> <color>#60636a</color>
</color-palette>

Color Blind 10

Discontinued.

Check out Color Blind in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Color Blind" type = "regular">
<color>#cfcfcf</color> <color>#ffbc79</color> <color>#a2c8ec</color> <color>#898989</color> <color>#c85200</color> <color>#5f9ed1</color> <color>#595959</color> <color>#ababab</color> <color>#ff800e</color> <color>#006ba4</color>
</color-palette>

Traffic Light

Discontinued.

Check out Traffic Light in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Traffic Light" type = "regular">
<color>#9fcd99</color> <color>#ffdd71</color> <color>#f26c64</color> <color>#69b764</color> <color>#ffc156</color> <color>#d82526</color> <color>#309343</color> <color>#dba13a</color> <color>#b10318</color>
</color-palette>

Purple-Gray 6

Discontinued.

<color-palette name="Classic Purple-Gray 6" type = "regular">
<color>#d7d5c5</color> <color>#d098ee</color> <color>#995688</color> <color>#94917b</color> <color>#dc5fbd</color> <color>#7b66d2</color>
</color-palette>

Purple-Gray 12

Discontinued.

Check out Purple-Pink-Gray in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Purple-Gray 12" type = "regular">
<color>#dbd4c5</color> <color>#8b7c6e</color> <color>#d098ee</color> <color>#ab6ad5</color> <color>#d898ba</color> <color>#995688</color> <color>#b4b19b</color> <color>#5f5a41</color> <color>#ffc0da</color> <color>#dc5fbd</color> <color>#a699e8</color> <color>#7b66d2</color>
</color-palette>

Green-Orange 6

Discontinued.

<color-palette name="Classic Green-Orange 6" type = "regular">
<color>#b85a0d</color> <color>#39737c</color> <color>#ffd94a</color> <color>#3cb7cc</color> <color>#ff7f0f</color> <color>#32a251</color>
</color-palette>

Green-Orange 12

Discontinued.

Check out Green-Orange-Teal in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Green-Orange 12" type = "regular">
<color>#ccc94d</color> <color>#82853b</color> <color>#86b4a9</color> <color>#39737c</color> <color>#ffd94a</color> <color>#b85a0d</color> <color>#98d9e4</color> <color>#3cb7cc</color> <color>#ffb977</color> <color>#ff7f0f</color> <color>#acd98d</color> <color>#32a251</color>
</color-palette>

Blue-Red 6

Discontinued.

<color-palette name="Classic Blue-Red 6" type = "regular">
<color>#e9c39b</color> <color>#ea6b73</color> <color>#6ba3d6</color> <color>#ac613c</color> <color>#f02720</color> <color>#2c69b0</color>
</color-palette>

Blue-Red 12

Discontinued.

Check out Blue-Red-Brown in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Blue-Red 12" type = "regular">
<color>#f4737a</color> <color>#bd0a36</color> <color>#ddc9b4</color> <color>#ac8763</color> <color>#b5dffd</color> <color>#6ba3d6</color> <color>#e9c39b</color> <color>#ac613c</color> <color>#ffb6b0</color> <color>#f02720</color> <color>#b5c8e2</color> <color>#2c69b0</color>
</color-palette>

Cyclic

Discontinued.

Check out Hue Circle in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Cyclic" type = "regular">
<color>#6f63bb</color> <color>#8a60b0</color> <color>#ba43b4</color> <color>#c7519c</color> <color>#d63a3a</color> <color>#ff7f0e</color> <color>#ffaa0e</color> <color>#ffbf50</color> <color>#bcbd22</color> <color>#78a641</color> <color>#2ca030</color> <color>#12a2a8</color> <color>#1f83b4</color>
</color-palette>

Green

Discontinued.

Check out Green in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Green" type = "ordered-sequential">
<color>#09622a</color> <color>#1a7232</color> <color>#27823b</color> <color>#339444</color> <color>#69a761</color> <color>#94bb83</color> <color>#bccfb4</color>
</color-palette>

Gray

Discontinued.

Check out Gray in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Gray" type = "ordered-sequential">
<color>#1e1e1e</color> <color>#282828</color> <color>#333333</color> <color>#3f3f3f</color> <color>#4b4b4b</color> <color>#585858</color> <color>#666666</color> <color>#747474</color> <color>#838383</color> <color>#929292</color> <color>#a2a2a2</color> <color>#b2b2b2</color> <color>#c3c3c3</color>
</color-palette>

Blue

Discontinued.

Check out Blue in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Blue" type = "ordered-sequential">
<color>#26456e</color> <color>#1c5998</color> <color>#1c73b1</color> <color>#3a87b7</color> <color>#67add4</color> <color>#7bc8e2</color> <color>#b4d4da</color>
</color-palette>

Red

Discontinued.

Check out Red in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red" type = "ordered-sequential">
<color>#9c0824</color> <color>#b10c1d</color> <color>#c21417</color> <color>#cf1719</color> <color>#d8392c</color> <color>#e35745</color> <color>#f57667</color> <color>#f89a90</color> <color>#eac0bd</color>
</color-palette>

Orange

Discontinued.

Check out Orange in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Orange" type = "ordered-sequential">
<color>#7b3014</color> <color>#a33202</color> <color>#d74401</color> <color>#f06511</color> <color>#fd8938</color> <color>#fdab67</color> <color>#f0c294</color>
</color-palette>

Area Red

Discontinued.

<color-palette name="Classic Area Red" type = "ordered-sequential">
<color>#bd1100</color> <color>#c92b14</color> <color>#d43e25</color> <color>#e04e35</color> <color>#ea5e45</color> <color>#f46b55</color> <color>#fd7864</color> <color>#fe8b7a</color> <color>#fd9c8f</color> <color>#fbb3ab</color> <color>#f5cac7</color>
</color-palette>

Area Green

Discontinued.

<color-palette name="Classic Area Green" type = "ordered-sequential">
<color>#3c8200</color> <color>#4a8c1c</color> <color>#569735</color> <color>#60a24d</color> <color>#6cae59</color> <color>#7abc5f</color> <color>#8ac765</color> <color>#9ad26d</color> <color>#acdc7a</color> <color>#c3e394</color> <color>#dbe8b4</color>
</color-palette>

Area Brown

Discontinued.

<color-palette name="Classic Area-Brown" type = "ordered-sequential">
<color>#bb5137</color> <color>#bb6348</color> <color>#bb7359</color> <color>#c08262</color> <color>#cc8f63</color> <color>#d89c63</color> <color>#e4aa63</color> <color>#f0b763</color> <color>#f7c577</color> <color>#f6d29c</color> <color>#f3e0c2</color>
</color-palette>

Red-Green Diverging

Discontinued.

Check out Red-Green Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red-Green" type = "ordered-diverging">
<color>#09622a</color> <color>#1e7735</color> <color>#2f8e41</color> <color>#69a761</color> <color>#a2c18f</color> <color>#cacaca</color> <color>#fc8375</color> <color>#df513f</color> <color>#d11719</color> <color>#bd1316</color> <color>#9c0824</color>
</color-palette>

Red-Blue Diverging

Discontinued.

Check out Red-Blue Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red-Blue" type = "ordered-diverging">
<color>#26456e</color> <color>#1c5998</color> <color>#1c73b1</color> <color>#3a87b7</color> <color>#67add4</color> <color>#cacaca</color> <color>#fc8375</color> <color>#df513f</color> <color>#d11719</color> <color>#bd1316</color> <color>#9c0824</color>
</color-palette>

Red-Black Diverging

Discontinued.

Check out Red-Black Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red-Black" type = "ordered-diverging">
<color>#1e1e1e</color> <color>#383838</color> <color>#565656</color> <color>#777777</color> <color>#9b9b9b</color> <color>#cacaca</color> <color>#fc8375</color> <color>#df513f</color> <color>#d11719</color> <color>#bd1316</color> <color>#9c0824</color>
</color-palette>

Area Red-Green Diverging

Discontinued.

<color-palette name="Classic Area Red-Green" type = "ordered-diverging">
<color>#4a8c1c</color> <color>#559633</color> <color>#5ea049</color> <color>#69aa56</color> <color>#75b65d</color> <color>#82c162</color> <color>#90cb68</color> <color>#a0d571</color> <color>#b1de7f</color> <color>#c7e298</color> <color>#e9dabe</color> <color>#fca294</color> <color>#fe8e7e</color> <color>#fd7e6b</color> <color>#f7705b</color> <color>#ef654d</color> <color>#e6583e</color> <color>#dc4930</color> <color>#d23a21</color> <color>#c82912</color> <color>#bd1100</color>
</color-palette>

Orange-Blue Diverging

Discontinued.

Check out Orange-Blue Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Orange-Blue" type = "ordered-diverging">
<color>#26456e</color> <color>#1c5998</color> <color>#1c73b1</color> <color>#3a87b7</color> <color>#67add4</color> <color>#7bc8e2</color> <color>#cacaca</color> <color>#fdab67</color> <color>#fd8938</color> <color>#f06511</color> <color>#d74401</color> <color>#a33202</color> <color>#7b3014</color>
</color-palette>

Green-Blue Diverging

Discontinued.

Check out Green-Blue Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Green-Blue" type = "ordered-diverging">
<color>#26456e</color> <color>#1c5998</color> <color>#1c73b1</color> <color>#3a87b7</color> <color>#67add4</color> <color>#cacaca</color> <color>#a2c18f</color> <color>#69a761</color> <color>#2f8e41</color> <color>#1e7735</color> <color>#09622a</color>
</color-palette>

Red-White-Green Diverging

Discontinued.

Check out Red-Green-White Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red-White-Green" type = "ordered-diverging">
<color>#09622a</color> <color>#297839</color> <color>#428f49</color> <color>#74af72</color> <color>#b9d7b7</color> <color>#ffffff</color> <color>#fcb4a5</color> <color>#e86753</color> <color>#cc312b</color> <color>#b41f27</color> <color>#9c0824</color>
</color-palette>

Red-White-Black Diverging

Discontinued.

Check out Red-Black-White Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Red-White-Black" type = "ordered-diverging">
<color>#1e1e1e</color> <color>#393939</color> <color>#575757</color> <color>#838383</color> <color>#bfbfbf</color> <color>#ffffff</color> <color>#fcb4a5</color> <color>#e86753</color> <color>#cc312b</color> <color>#b41f27</color> <color>#9c0824</color>
</color-palette>

Orange-White-Blue Diverging

Discontinued.

Check out Orange-Blue-White Diverging in 10.0 and higher for the updated version of this palette.

<color-palette name="Classic Orange-White-Blue" type = "ordered-diverging">
<color>#26456e</color> <color>#2e5f8a</color> <color>#3679a8</color> <color>#6a9ec5</color> <color>#b7cde2</color> <color>#ffffff</color> <color>#ffc2a1</color> <color>#fb8547</color> <color>#d85a13</color> <color>#a84415</color> <color>#7b3014</color>
</color-palette>

Red-White-Black Light

Discontinued.

<color-palette name="Classic Red-White-Black Light" type = "ordered-diverging">
<color>#c6c6c6</color> <color>#d1d1d1</color> <color>#dddddd</color> <color>#e8e8e8</color> <color>#f3f3f3</color> <color>#ffffff</color> <color>#fff0f0</color> <color>#ffe0e1</color> <color>#ffd1d3</color> <color>#ffc2c5</color>
</color-palette>

Orange-White-Blue Light Diverging

Discontinued.

<color-palette name="Classic Orange-White-Blue Light" type = "ordered-diverging">
<color>#c4d8f3</color> <color>#d0e0f6</color> <color>#dce8f8</color> <color>#e8effa</color> <color>#f3f7fd</color> <color>#ffffff</color> <color>#fff5eb</color> <color>#ffead8</color> <color>#ffe0c5</color> <color>#ffd6b1</color> <color>#ffcc9e</color>
</color-palette>

Red-White-Green Light Diverging

Discontinued.

<color-palette name="Classic Red-White-Green Light" type = "ordered-diverging">
<color>#b7e6a7</color> <color>#c6ebb8</color> <color>#d5f0ca</color> <color>#e3f5db</color> <color>#f1faed</color> <color>#ffffff</color> <color>#fff0f0</color> <color>#ffe0e1</color> <color>#ffd1d3</color> <color>#ffc2c5</color> <color>#ffb2b6</color>
</color-palette>

Red-Green Light Diverging

Discontinued.

<color-palette name="Classic Red-Green Light" type = "ordered-diverging">
<color>#b7e6a7</color> <color>#c1e6b4</color> <color>#cae6c0</color> <color>#d4e6cc</color> <color>#dde6d9</color> <color>#e5e5e5</color> <color>#ecdbdc</color> <color>#f2d1d2</color> <color>#f8c7c9</color> <color>#fcbdc0</color> <color>#ffb2b6</color>
</color-palette>

Restore a discontinued (classic) palette

  1. Go to the My Tableau Repository folder in your Documents directory, and open the Preferences.tps file.

  2. Between the opening and closing workbook tags, insert opening and closing preferences tags.

  3. In the Preferences.tps file, between the "preferences" tags, paste the XML code for the discontinued palette (see Hex values for discontinued color palettes). For example:

    <color-palette name="Classic Blue Red 12" type = "regular">
    <color>#f4737a</color> <color>#bd0a36</color> <color>#ddc9b4</color> <color>#ac8763</color> <color>#b5dffd</color> <color>#6ba3d6</color> <color>#e9c39b</color> <color>#ac613c</color> <color>#ffb6b0</color> <color>#f02720</color> <color>#b5c8e2</color> <color>#2c69b0</color>
    </color-palette>

    Use straight quotation marks (as in' ' or " "), not curly quotation marks, to delimit the palette's name and type.

  4. Save the Preferences.tps file and then restart Tableau Desktop.

    When you open the Edit Colors dialog box and choose Select Color Palette, the color palette you added will be at the bottom of the palette list.