When 2 colors are the same, it looks as a GUI-bug:
Why would you want the parent category color to be the same as the child category color? This just reeks of bad category selection to me.
For our setup it looks pretty well and people like subcategories to be of the same color as their categories:
Anyway, I’d say it is a GUI bug the way it is now since people can use the same color, so if they do so, it should still look nice.
I can’t speak for others, but personally I can understand subcategories being in the same color “family” but would want to have them not be identical.
We can not special case this, what if you are 1 shade off, etc. You are going to need either custom css here or to chew up the extra space and pick the expand category badges setting.
Well, 1 shade off is a good example.
However, a predefined palette from the site settings is usually used to set category colors, so
1 shade off is really a very rare case compared to the case described in the original post.