Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!sunybcs!ugpete From: ugpete@sunybcs.UUCP Newsgroups: comp.sys.amiga Subject: RGB <-> HLS Message-ID: <2848@sunybcs.UUCP> Date: Sun, 5-Apr-87 03:00:49 EST Article-I.D.: sunybcs.2848 Posted: Sun Apr 5 03:00:49 1987 Date-Received: Mon, 6-Apr-87 05:35:50 EST Sender: nobody@sunybcs.UUCP Reply-To: ugpete@sunybcs.UUCP (Peter Theobald) Organization: SUNY/Buffalo Computer Science Lines: 24 Keywords: color, palettes, conversion, confusion, help, aaaaaaaaahhhh < '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