Shameless plug: history explorer card Solves the visibility problem, makes the history colors themeable and much more.
What do you suggest they should do ? Currently they use a fixed pool of predefined colors they sequentially assign to states as they come along. This is a reasonable way to do it. It will guarantee that same states across different entities will receive the same color and it will reduce the risk of collision between two similar colors. It will however not guarantee continuity. If the order of entities or states displayed in entities change, then the color assignments for a certain state will change.
Thereās not 100 million ways of doing this. You canāt know the states youāre going to encounter and you donāt know in which entities theyāre going to show up. You donāt know which of the states (that you donāt know) are going to end up side by side in which entity. The code isnāt psychic, it canāt read your mind.
In my history explorer card I linked to above I used a different approach. I used MD5 hashes of entity state names to generate colors for them. This solves the continuity problem (a certain state will always retain the same color regardless of order), but it can generate similar colors on a same entity timeline for adjacent states. Thereās always advantages and drawbacks, thereās no perfect system for automatically determining colors.
Or just assign manual colors to the states you care most about.