Perceptually uniform color spaces
I've grappled with this problem multiple times in data-vis programming.<p>A related problem is, once you have a uniform color space, how do you color code a list of things such that:<p>A) Color are maximally distinguishable from each other, i.e. maximally separated on the color wheel.<p>B) Colors are stable as items are added and removed, to avoid confusion caused by the color for an item shifting as you update the display.<p>The two criteria are at odds, unfortunately. The compromise I came up used PHI, since it's essentially a radial distribution problem, which PHI excels at. Something like:<p><pre><code>    (PHI * idx * 360) % 360</code></pre>