ugpete@sunybcs.UUCP (04/05/87)
< 'There are two kinds of people in this world. Those with guns, and those < who dig.......You dig!' > Can anyone help me with a color requester?? I need an algorithm to convert from RGB (Red, Green, Blue) values for a color to HLS (Hue, Luminance, Saturation) for the same color, and back again. Please DONT tell me how to convert RGB <-> HVS (Hue, Value, Saturation) as this is a slightly different color representation and not what I need. It's pretty strange... I found at least 5 different sources ('c' code, textbooks, people, etc...) that explain RGB <-> HVS, but nowhere RGB <-> HLS!! It's a conspiracy! yah, thats it! :-) I NEED this algorithm fast, it's for a project and other people are waiting for my part!!!! So please help!!!!! Peter Theobald SUNY/Buffalo Computer Science csnet: ugpete@buffalo.CSNET uucp: ..!{nike|watmath,alegra,decvax}!sunybcs!ugpete BITNET: ugpete@sunybcs.BITNET
carolyn@cbmvax.UUCP (04/08/87)
In article <2848@sunybcs.UUCP> ugpete@sunybcs.UUCP (Peter Theobald) writes: > It's pretty strange... I found at least 5 different sources ('c' code, >textbooks, people, etc...) that explain RGB <-> HVS, but nowhere RGB <-> HLS!! > I NEED this algorithm fast, it's for a project and other people are >waiting for my part!!!! So please help!!!!! The excellent book "Procedural Elements for Computer Graphics" by David F. Rogers (McGraw-Hill) contains pseudocode for RGB <-> HLS. I would post the code but a. I don't have time to type it in b. It would be copyright infringement You could try calling New York City information (1-212-555-1212 ?) to get the number of McGraw-Hill. You may be able to order the book directly from them or from their massive professional book store in Manhattan (that's where I got mine). The book covers drawing algorithms, data encoding, fills, anti-aliasing, half-toning, clipping, hidden lines, ray tracing, illumination, texture mapping, and color. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
papa@bacall.UUCP (Marco Papa) (04/12/87)
> In article <2848@sunybcs.UUCP> ugpete@sunybcs.UUCP (Peter Theobald) writes: > > > It's pretty strange... I found at least 5 different sources ('c' code, > >textbooks, people, etc...) that explain RGB <-> HVS, but nowhere RGB <-> HLS!! > Carolyn Scheppner responds: > The excellent book "Procedural Elements for Computer Graphics" by > David F. Rogers (McGraw-Hill) contains pseudocode for RGB <-> HLS. > > You could try calling New York City information (1-212-555-1212 ?) > to get the number of McGraw-Hill. You may be able to order the book > directly from them or from their massive professional book store in > Manhattan (that's where I got mine). > McGraw-Hill has a toll free number: 1-800-2-MCGRAW -- Marco -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Marco Papa 3175 S. Hoover St., Ste. 275 (213)747-8498 Los Angeles, CA 90007 USC: (213)743-3752 F E L S I N A Now working for ::::::: BIX: papa But in no way :: :: Officially representing ::::::: ...!usc-oberon!bacall!papa S O F T W A R E papa@usc-cse.usc.edu -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-