Path: utzoo!utgpu!water!watmath!clyde!rutgers!psuvax1!vu-vlsi!cbmvax!daveb From: daveb@cbmvax.UUCP (Dave Berezowski) Newsgroups: comp.graphics Subject: Re: Converting RGB <-> HSV Message-ID: <3170@cbmvax.UUCP> Date: 20 Jan 88 16:45:56 GMT References: <6781@bbn.COM> <7018@pur-ee.UUCP> Reply-To: daveb@cbmvax.UUCP (Dave Berezowski) Organization: Commodore Technology, West Chester, PA Lines: 21 In article <7018@pur-ee.UUCP> 3ksnn64@pur-ee.UUCP (Joe Cychosz) writes: >In article <6781@bbn.COM> cosell@bbn.com.UUCP (Bernie Cosell) writes: >> >>Does anyone have the formulae for converting Red/Green/Blue color >>specs to and from Hue/Saturation/Value specs? Also, does anyone >>have the equation for converting color->grayscale? Thanks > > >RGB to grayscale: > > Y = .59*R + .11*G + .33*B > >RGB to/from HSV: > > This is discussed in Foley and Van Dam book "Fundementals of > Interactive Computer Graphics." A more accurate formula is: White = .299*R + .587*G + .114*B