Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ucdavis!iris!foss From: foss@iris.ucdavis.edu (Jim Alves-Foss) Newsgroups: comp.graphics Subject: Re: RGB to Hue/Saturation/Luminence Message-ID: <4759@ucdavis.ucdavis.edu> Date: 27 Jun 89 16:12:59 GMT References: <2922@ukecc.engr.uky.edu> Sender: uucp@ucdavis.ucdavis.edu Reply-To: foss@iris.ucdavis.edu (Jim Alves-Foss) Distribution: usa Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 13 In article <2922@ukecc.engr.uky.edu> agollum@ukecc.UUCP (Kenneth Herron) writes: >.... Does anyone have the formulas to convert >from RGB to HSL? Or know of a good algorithm for doing these things? >(more details available on request) The book: David F. Rogers, "Procedural Elements for Computer Graphics", McGraw-Hill 1985 has pseudocode algorithms for RGB<-->(HLS|HSV) starting on page 401. His descriptions of these methods is also understandable. If you can't find it, I'll dig up my 'C' versions and send them to you. -Jim Alves-Foss (foss@iris.ucdavis.edu) /* Of course these are MY opinions */