Skip to main content

Jim Dehner 

 Tableau Visionary – HoF

Tableau How to’s,  Use Cases, and Forums Questions

Hey #DataFam

Let’s Talk

Open for

Post Links

Color brings a lot to a visualization—it creates impact, highlights key points, clarifies insights, and makes visuals more engaging. But do you know how to set up, choose, edit, or add custom colors in Tableau?

When color is applied to categorical (Blue Pill) data, a discrete palette is created. If the data is qualitative, the result is one of two different continuous palettes: “Sequential” (single color) or “Divergent” (2-color).

Discrete Palettes

We will start with using discrete color palettes created when you drop a Blue Pill on the color tile-

Choose from the default palette or select from several predefined options in the dropdown menu.

Edit the Discrete Palette

Want to change a color? No problem. Select the color block; then, there are three options.

The easiest way to swap out a color from the current palette

Or you can replace the color on the palette with one from the base color options.

Finally, you could select a specific color using the continuous palette or by keying in a hex code.

When a discrete color is applied to text charts, it also automatically includes the total and Grand Total rows.

While three colors can bring clarity to a bar chart, see what happens when we use the 17-value sub-category dimension. Wow, way too many – total confusion.

So, what can you do?

One option is to place Category on Color, then drag Sub-category to the marks card and convert it (click the icon) to Color – You will have three base hues for the categories and variations for the sub-categories.

Discrete palettes aren’t limited to Dimensions but can be used with any discrete field.

Here, colors are applied to the four quadrants of a scatter plot.

It is done by first finding the average sales and profit using LOD’s

Sales:

avg({ FIXED :   avg({ FIXED [Sub-Category] :sum([Sales]) })})

 

Profit:

avg({ FIXED :   avg({ FIXED [Sub-Category] :sum([Profit]) })})

and a conditional statement for the color

{ FIXED [Sub-Category]  : ( if sum([Sales])>=[ fixed avg sales ] and sum([Profit]) >=[ fixed avg profit] then "Grp 1"

elseif  sum([Sales])>=[ fixed avg sales ] and sum([Profit]) <=[ fixed avg profit] then "Grp 2"

elseif  sum([Sales])<=[ fixed avg sales ] and sum([Profit]) >=[ fixed avg profit] then "Grp 3"

else "Grp 4"  end  )}

and editing the color tile

Color can also be used to highlight values – here to identify the products from a specific manufacturer chosen with a parameter:

That's how you can add and change discrete color palettes. But how is it done with sequential or divergent palettes?  

Continuous Palettes

Sequential palettes and divergent palettes do much the same thing (i.e., compare a range of values for a single measure). Sequential palettes are based on gradations of a single color, where divergent palettes are based on two colors  (typically contrasting) with graduations to a midpoint.

Need a custom color? Open the Color Tile

Edit the Continuous Palettes

Start with the default. Tableau will relate the gradient to the range of measured values in your viz. But that may not be what you want. Open the Color Edit tile and edit the Start, End, and Mid points to meet your needs.

The range start, end, and midpoint can be edited. Here to from .5 to 2.5M

Next, set the steps to 10 to create “200K-size bin.”

Finally, the color sequence can be reversed if needed.

Divergent Palettes

Divergent palettes are also continuous but use two colors to contrast between the lower and higher values of a measure. When a measure has both positive and negative values, the divergent palette is the default.

In this profit US map, Tableau has used the default orange-blue divergent palette centered around no profit (0)

Using a similar process, we can change the palette and reset the start and end point colors.

The low end has a dark gold base color. The high end is a very dark green. I added a neutral for the zero point and a mid-range color between each of the ends for a total of five.

When the palette is applied to the US map, the states with the highest and lowest (most negative)  profit are emphasized with the boldest colors.

I used a 7-step diverging palette and the Full Color Range option to highlight low values that might otherwise be overlooked.

The final option available is to use a parameter to set and a parameter action to change the start, end, and mid values for the color range.

Dynamic Range Option

Before the 2025.3 release, dynamic ranges were created manually with separate calculations. In this example, I have used a sequential color palette based on the state-level sales and the "Update on Interaction" option on all three metrics:

Tableau creates individual parameter actions with the appropriate aggregation for the start, mid, or end point colors:

There is a wide range of values overall, making it difficult to compare states with lower sales just by looking at the color. The parameter-driven option adjusts the color scale to focus on the selected states, highlighting the differences in their sales ranges.

Great, but a word of caution- The color range is based on the visually selected states, so you will need to manually select all the states to reset the color range.

Custom Color Palettes

Whether adhering to corporate standards or achieving a specific look often means creating a custom color palette. Before 2025.2, that meant creating a text document to replace the “Preference” file (see https://help.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.htm). Now it can be done directly in the Color Tile:

Create from Tableau predefined palettes

Modifying or adding to one of Tableau’s predefined palettes starts by opening the color tile, selecting Create Custom Palette, and entering the palette name –

Edit the palette – adding or deleting swatches as needed.

Change the swatch color using the detailed color selector or by keying in the hex code.

When you have the palette done, select  "Save".

The palette is available for this and any other worksheet.

If you need to make changes or delete the palette, open the color tile editor and select the three vertical dots:

One final option, keying in hex codes, is easy: 

Need a pallet? See https://public.tableau.com/app/profile/ken.flerlage/viz/DatafamColors/StartPage  for over 200 custom palettes and their hex codes.

I hope this helps you understand how to set up, choose, edit, or add your own custom colors. But what about making it look great? Many community experts know all about mixing, coordinating, and contrasting colors to create stunning effects. I recommend following Jennifer Dawes ( Jennifer's Tableau Public Link ) and Heather Cox ( Heather's Tableau Public Link ) their outstanding work can truly elevate your results.

Examples used here can be downloaded at Custom Color Workbook.

Leave a Reply

Your email address will not be published. Required fields are marked *