Sorting by spectrum
Bob Rasmussen
ras at anzio.com
Wed Mar 3 17:59:38 PST 2004
On Wed, 3 Mar 2004, Walter Vaughan wrote:
> I know this seems like a weird idea, but I know several developers
> are in the flooring industry and someone may have come up with
> a solution....
>
> I need to sort records by their RGB (Red/Green/Blue) value
> into spectrum order.
>
> I have three fields with 0-255 values. (0/0/0 would be black,
> 255,255,255 would be white).
>
I believe this might work: convert RGB values to HSV (Hue, saturation,
value). This is a mathematical transformation that is not too hard. I
don't have it handy, but I could look it up.
Then sort with a primary key of H and a secondary key of S.
Regards,
....Bob Rasmussen, President, Rasmussen Software, Inc.
personal e-mail: ras at anzio.com
company e-mail: rsi at anzio.com
voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
fax: (US) 503-624-0760
web: http://www.anzio.com
More information about the Filepro-list
mailing list