Saving Your Custom Color Palette in Tableau

The new color tools in Tableau 9 are great. I really like the new color picker tool, it comes in very handy. This week I was working with some colors and I was frustrated. I've seen posts and comments from people about using the custom color palettes and the fact that when the workbook is closed that the custom colors are lost. A few weeks ago I listened to the Think Data Thursday session here, with Tableau Zen Masters Shawn Wallwork, Steve Wexler and Peter Gilks. In that video, at around 5 minutes and 30 seconds, Shawn demonstrated the custom colors and he specifically mentions the fact that adding custom colors won't save with the workbook. There's even an idea on the Tableau forum for this here, with 59 votes. So this issue seems pretty widely known. So why was I so frustrated? Well, I was actually having the opposite problem. I had filled up all 16 of my colors. Every time I opened a workbook I had the same 16 custom colors filled in. I had been saving custom colors over and over and eventually ran out of space.

So the problem solving began. First, I wanted to make sure I wasn't crazy. I was emailing back and forth with Tableau Zen Master Jonathan Drummey, so I asked him about his colors when he closed and opened. He confirmed that they did not save. I checked a few machines around the office and those didn't save either. I emailed Zen Master Wexler and he confirmed that his didn't save. At this point I knew something odd was happening and I couldn't get mine to save over top of the colors that were loading as default. I also noticed that I had different colors loading at home vs. the office, but one thing was certain, colors were definitely saving.

I started to examine the things that were changing and not changing in the log files (ex. there is an RGB color in the log file for the custom color selected). Then I figured it out. I had been selecting the custom colors in two different ways. So I quickly tested and sure enough, one method doesn't save them and the other method does. So here's the two methods, how not to save them and how to save them.

First, the method I'm guessing most people use. Pick any color, using the color picker or enter a color code. Then click "Add to Custom Colors". The color then goes into one of the custom color boxes. If you want it to go into a certain color box, for example, the very last box on the bottom row, then select that box with the mouse first before picking or entering your color. Then when you click the "Add to Custom Colors" button it will place in the last box. This is the method that when picking your custom color, the colors will only stay available during your current session of Tableau. If you close Tableau completely, whether you save the workbook or not, when you open the color dialog box again, those colors will be gone. The colors used in any chart or as part of the visualization will remain, but the custom color values will be empty.

Now for the second method. Follow the same instructions to pick the color or enter the color. However, this time, do NOT click the "Add to Custom Color" button. Instead, place the mouse cursor over the color swatch that is next to the 2 rows of custom color and drag the color over to one of the custom color boxes. You can do this as many times as you like, until you fill up all 16 custom color boxes. Click OK and then close Tableau. You don't even have to save your workbook in order to save the custom colors. Now reopen any Tableau workbook and when you go to the color dialog box you will now see all of the custom colors that you set in the previous session. In fact, if you then use the "Add to Custom Color" button to add colors on top of these, they will only be temporary. When you open your next Tableau session it will default be back to the custom colors that you "fixed" in the custom color box by dragging them over.

Here's an example of how to pick the colors and drag them over (click image for an animated gif).


Want to clear them out again? No worries. Just drag the white color from above down to all of the boxes and you will have 16 white boxes. Note - the settings for these custom colors follows the install of Tableau, not the workbook from machine to machine. This is why my home and office had two different color palettes saved. Regardless, this is a helpful trick to keep the custom colors saved between different sessions of Tableau or setting a primary default for the custom color palette on a specific computer.

I hope you find this tip useful. As always, feel free to email me at Jeff@DataPlusScience.com

Jeffrey A. Shaffer
Follow on Twitter @HighVizAbility