Xref: utzoo comp.windows.x:35752 comp.graphics:17522 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!charyb!dan From: dan@kfw.COM (Dan Mick) Newsgroups: comp.windows.x,comp.graphics Subject: Re: changing color intensity in X Message-ID: <1991Apr25.214357.7963@kfw.COM> Date: 25 Apr 91 21:43:57 GMT References: <1991Apr20.204325.2078@eng.ufl.edu> <728@modulex.dk> Reply-To: dan@kfw.com (Dan Mick) Organization: KFW Corporation, Newbury Park, CA Lines: 16 In article <728@modulex.dk> ssn@modulex.dk (Svend Skafte Nielsen) writes: > > Intensity (also called lightness or luminance) is usually calculated > as > > I = (R+G+B)/3 > > where R, G and B are the resp. red, green and blue components of the > color (e.g. from the XColor structure). I'd take exception to the "usually". Most RGB-to-grayscale convertors I've seen use a formula much more like the one in ppmtopgm, part of the PBMPLUS package: (From the manpage): "The quantization formula used is .299 r + .587 g + .114 b."