Hacker News new | ask | show | jobs
by hotpockets 4875 days ago
I've used something similar in matlab, which I though worked a little better. It started out with red green blue, colors frequently considered maximally distinct, at least on color monitors for the non-colorblind. Then it just found maximally distant points in the color cube. I found it worked nicely and you could also seed it with your own starting color(s).

Edit: found out it is based on Lab color space.

2 comments

I'm no color expert but I'm pretty sure color distance in RGB space is a pretty poor metric compared to other color models (at least some of them). Looking at an RGB color cube I see big splashes of near-identical colors while the entire spectrum of oranges is hard to even find.
Looking closer, it uses the Lab colorspace. Here is what I was using: http://www.mathworks.us/matlabcentral/fileexchange/29702
But, doing it this way can result in oversaturated colors that compete for attention.
Interesting point. Though, some of the colors in OPs preset examples seemed very similar, even with only 7 colors. For generating graphs, maximally distinct colors seems the primary goal, even if they compete for attention, perhaps because of it.