Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: hodge!jdm@uunet.uu.net (James Murray)
Newsgroups: comp.sys.sun
Subject: RGB <==> HSI value conversion
Message-ID: <729@brazos.Rice.edu>
Date: 5 Aug 89 20:08:05 GMT
Sender: root@rice.edu
Organization: Sun-Spots
Lines: 24
Keywords: Software
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 8, Issue 92, message 11 of 18

I would be interested in knowing how one goes about converting a range of
RGB values to a range of HSI values.  For instance, the Tips paint program
used with the Targa 16 allows you to create colors by using RGB values
each with a range of 0-31, or by using HSI values with a range of 1-100.
The actual values stored in the Targa image file are the RGB values, so
what is the math I need to do in order to convert the 0-31 range RGB
values to the 1-100 range HSI values?

A similar thing exists on the Sun with the color editor.  The RGB and HSI
values are in a range of 0 to 255 (except for Hue which is 0 to 359).  The
RGB and HSI values do not match, so I need the math to calculate RGB given
HSI values and HSI  given RGB values.


-- 

"I'm an anthropologist, not a computer systems architect, damit!"

jdm@hodge.cts.com [uunet zardoz crash]!hodge!jdm

James D. Murray, Ethnounixologist	TEL: (714) 998-7750 Ext. 129	
Hodge Computer Research Corporation	FAX: (714) 921-8038
1588 North Batavia Street 
Orange, California 92667  USA