

Be sure to use straight quotation marks, not curly quotation marks, to delimit the palette's name and type. In the Preferences.tps file, between the "preferences" tags, paste the following. To create a custom categorical color palette: Note that the type attribute is specified as regular, which identifies this palette as a categorical palette. The following is an example of what to add between the preferences tags to add a categorical color palette. For example, when you put a discrete dimension such as Region on the Color card, the categorical color legend is used. Follow one of the next three procedures to create a custom color palette.Ī categorical color palette contains several distinct colors that can be assigned to discrete dimension members.Go to the My Tableau Repository folder in your Documents directory, and open the Preferences.tps file.īetween the opening and closing workbook tags, insert opening and closing preferences tags so that it looks like this: An unedited preferences file looks like this: The file is a basic XML file that you can open in a text editor to modify. The Preferences.tps file is located in your My Tableau Repository. Note: 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 ‘ ’). Also, there is no guarantee that custom color palettes you create will work with future Tableau Desktop upgrades. Tableau doesn't test or support custom color palettes, so be sure to back up your workbooks before you continue. You can use a new palette like you would any other. 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). 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). If you need to manually assign more than 20 colors to data items, you may want to create several custom palettes with 20 or fewer colors in each palette. Although there isn’t a limit to how many colors can be added to each custom palette, the Edit colors dialog box only shows 20 colors. You can add as many custom palettes as you like to your Preferences.tps file, each with as many colors as you want. For example, you can create a custom categorical palette that matches your company's brand. You can also create and use your own custom color palettes by modifying the Preferences.tps file that comes with Tableau Desktop. 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, heatmaps, bar charts, etc.
