> Your code is reasonable, you're just not aware of all of the issues > with colors. > > In a pure white color (maximum intensity), hue and saturation are > meaningless. Hence, if you have a color at just below maximum > intensity, hue and saturation are meaningful, but only a little.
Ah yes, maybe I should add a little something to reduce the importance of hue and saturation as intensity increases...? > As an example, the colors (255,255,254) and (255,254,255) are pretty > much the same color, but have very different hue values. So, it's > normal to see the effect that you do. > As colors (in these cases) have three dimensions, sorting them into a > linear scale is problematic at best. What problem are you trying to > solve? I'm a lighting designer, and various manufacturers sell color filters in a wide range of colors. Every manufacturer's colors are slightly different, of course. I need to present several different brands of color in either the mfg's numeric order (which is easy), or in color order (which is hard). And of course, it would be best if I could combine several mfg's colors into a single chromatic "rainbow". This is something that's best done in a 3D format, but we lighting designers are used to viewing rectangular swatches, so that's what I need to present to them: Those swatches in a color order that makes sense, or at least as close to sensible as possible. To make matters worse, most mfg's start their swatch books with pink/red and work their way through amber, yellow, and green, finishing up in blue. Which doesn't coincide with the HSV color model, which puts blue in the middle instead of at one end. Such a puzzle! - John _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
