in reply to Generating Visually Distinct Colors

I implemented something like this for an application I wrote once. The algorithm you're implementing chooses N evenly-spaced 3D grid points in the RGB color space. I found that this didn't give a terribly good result, because our eyes are far from being equally sensitive to changes in red, green, and blue at different points in the color space.

Anyone know of a better algorithm? As a first cut, probably using HSV space would be better, but you wouldn't want to sample it evenly -- you'd probably use a whole bunch of gradations in hue, but only a few in saturation and value.

I probably just ought to spend some quality time with Google. Given how important this is for things like MPEG encoding, I'm sure somebody's come up with a color space that approximates an even spreading of perceptual differences. Well, "approximates" it for "most" people, or something.

Then you'd just have to implement a "red/green colorblind" mode that a user could select, with a very different sampling space...

  • Comment on Re: Generating Visually Distinct Colors

Replies are listed 'Best First'.
Re^2: Generating Visually Distinct Colors
by Roy Johnson (Monsignor) on Mar 22, 2005 at 18:33 UTC
    The YUV colorspace is a good choice. It happens to be the color schema used in JPEG (and I presume in MPEG).

    Caution: Contents may have been coded under pressure.