In a view with totals, averages or percent values the first occurence of a color changing column is not ececuted in the category/totals row , but the consecutive ones are. This looks odd.
In a view where there are no totals used, the color columns in a category row are not executed at all.
I understand that if a formula is used instead of a fixed value, one has the problem that document values in the category / totals row don't make any sense as they are not really defined- values from the last read document in the view are useless for the category / total row. In such a case one could raise an error if the formula is executed in a total/category row and an @Iserror statement in that formula could be used to define a default color for the this column the totals/category row.
This would make the look and feel of such a view much better.