ColourIds clash


#1

there is a logic for setting them ? how can i know if my specific colour ids i’ve setup for my component don’t clash with others present in the juce default components ? (hope i have not to browse manually all the files…)

any hint on what number use to start counting new ColourIds (and will that be assured to not clash when you add more colour ids in future version of juce) ?


#2

No, there’s no particular logic, I just tried to split them up into groups for each class that they’re inside. What I normally do is to just do a quick file search when I’m creating a new one, to make sure it’s not already taken.

All of my IDs are in the same vague range though, so if you’re adding your own, it should be easy to make sure it’s well away from the sort of numbers I’m likely to choose in future.


#3

ok, i see from TextButton you use
0x1000100
0x1000101

so i think you will use
0x2000100
0x3000101
0x3000200
0x3000201
and so on… i will try to figure out another intellegible range :slight_smile:


#4