...
So far, sorting using HSV values seems to be best, but there are odd gaps
and jumps, particularly when near-white values are involved. Perhaps it's
just the limited display range of my monitor that's getting me confused?
...
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.
Colors in RB are 8 bits each of R, G, and B. Transforming those into
other spaces redistributes those bits around. However, you still have
one-bit granularity.
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?
Craig
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>