How to Customize Colors in Tableau
Now you’ve got some fonts that aren’t basic, how about some custom colors? I really like matching my visualizations to my report, which is almost always based on the color scheme of the organization I’m working with. Let me tell you though, this can be a bit of a beast, so let’s get started.
First, identify the colors you want to use. I suggest Adobe Color, which will allow you to upload a photo and get HEX codes (along with complementary colors and other fun things). Of course, you might be lucky and already have your HEX codes available.
Next, you’ll need to determine whether you want to add a categorical, sequential, or diverging palette. I’ll show you categorical. You can add the others as needed using the same method.
With your HEX codes in hand, locate your Tableau Repository. Depending on where you installed this, it could take a minute. When you locate it, there will be a Preferences.tps you need to open in a text editing program.
Now, get started with code. You want to add the following before copying anything into the text edit.
You will need to copy the basic code down and insert your HEX codes. Tableau lists all the sets of you would possibly need here. Copy, paste, and customize.
HERE IS THE TRICKY PART…
Make sure you are using straight quotes. Anything else will cause all sorts of errors. I’ve included examples of a correct and incorrect repository. This is often not a matter of inserting quotes but changing the auto-correction in the program.
Save and close your text editor and open Tableau! To test your colors, open up a sample dataset. On a worksheet, drag a dimension onto the Color Mark. You’ll immediately see those basic default colors but don’t worry – we’re fixing that!
Select the Color Mark and click Edit Colors. You should see yours at the bottom!
Select your color and be sure to click Assign, otherwise nothing will change. Close the editor and check out your new colors!
If you followed along, you just completed some serious steps in customizing your Tableau visualizations. I call it a small but mighty change. You can go forth knowing that your visualizations are more customized and specific to your project!
P.S. This is cross-posted on Ann K. Emery’s blog (because awesome people stick together)!