Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!necntc!dandelion!ulowell!hawk!dpelland From: dpelland@hawk.ulowell.edu (David Pelland) Newsgroups: comp.sys.amiga Subject: Re: RGB to HSV Colors Summary: Conversion formulas Message-ID: <7271@swan.ulowell.edu> Date: 27 May 88 19:52:02 GMT References: <8805271453.AA13503@jade.berkeley.edu> Sender: news@swan.ulowell.edu Reply-To: dpelland@hawk.ulowell.edu (David Pelland) Organization: University of Lowell, CS Dept. Lines: 11 In article <8805271453.AA13503@jade.berkeley.edu> BBOURBIN@UMDD.BITNET (Brett S Bourbin) writes: >Does anyone out there know of a formula for converting a RGB (red green blue) >color value, into a HSV (hue saturation value) one? H = cos^-1((1/2((R-G)+(R-G)))/(((R-G)^2+(R-B)(G-B))^(1/2))) S = 1 - ((3*(min(RGB)))/I) I = (R+B+G)/3 ((good) (luck) (with) (the) (parenthesis))