For quantitative palettes, there is the option to "Include Totals", however categorical coloring can get a bit tricky when it comes to the totals.
One method for accomplishing this can be done through this article: Assigning Different a Color for Grand Total Only | Tableau Software
My personal favorite method is to use the SIZE() table calculation. As the size function returns the number of items in the partition (addressing and partitioning depending), we should only see the totals having a size of 1 and every other item being > 1, using this we can set up a calculation to only color code when size is greater than 1, for example:
IF SIZE() > 1
I set up one of the sample workbooks with this method as an example.
Hope this helps!
KPIExample.twbx 370.8 KB