5 ms·
A really important thing for data-vis is generating distinguishably different random colors. It'd be great to have a library that produces series of distinguish
by loopdoend 12y ago
A really important thing for data-vis is generating distinguishably different random colors. It'd be great to have a library that produces series of distinguishable, pleasing colors.
- pwg 12y agoNot a "library" but possibly worth a look: "Picking a range of colors": http://wiki.tcl.tk/38935 http://wiki.tcl.tk/38935
- jacobolus 12y agoThis is a bad approach, because HSV is not an appropriate color model for this purpose.
- pwg 12y agoHow so? What would be an appropriate model, and why is HSV not appropriate?
- roryokane 12y agoAs the link says, “it's not perfect, as it doesn't take into account the different visual acuity of the human eye in different color channels”. That is why HSV is not appropriate – its H, S, and V scales are only approximations of axes that categorize colors as humans perceive them. For instance, V (value) roughly corresponds to how light or dark a color is, but blue with maximum V is way darker than yellow with maximum V. I don’t know what the best model is. HSL, at least, is a simple-to-understand strict improvement over HSV. Other people in this thread are suggesting models I don’t know much about like CIELAB and CIECAM02. A model I have used to choose colors before, which is a variation of CIELUV and an improvement over HSL, is HUSL: http://www.boronine.com/husl/ http://www.boronine.com/husl/.
- aw3c2 12y agohttp://colorbrewer2.org/ http://colorbrewer2.org/
- danieldk 12y agoI have a library that does this. It picks random colors in the RGB space (or any subspace) and then uses simulated annealing to optimise the distance between the colors in CIE LAB: https://github.com/danieldk/quzah https://github.com/danieldk/quzah I am no expert in this field, I just implemented the work of C.A. Glasbey, et al., 2006 :). We use it in one visualisation and the result is pleasing to my eye ;).