Xref: utzoo comp.windows.x:35751 comp.graphics:17519 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!island!hue From: hue@island.COM (Jon "Beer - It's not just for breakfast anymore" Hue) Newsgroups: comp.windows.x,comp.graphics Subject: Re: changing color intensity in X Message-ID: <3963@island.COM> Date: 25 Apr 91 19:09:13 GMT References: <1991Apr20.204325.2078@eng.ufl.edu> <728@modulex.dk> Sender: usenet@island.COM Followup-To: comp.windows.x Organization: Island Graphics Corp., San Rafael, CA Lines: 27 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 Oh really? I've never done it like that. Say, does anybody else do it like that? When I know the chromaticity coordinates and white point of the RGB device, I plug them into a program which spits out the RGB->XYZ matrix coefficients and use the 'Y' line. [284]coney:hue: ./calc Enter red x and y: 0.625 0.340 Enter green x and y: 0.280 0.595 Enter blue x and y: 0.155 0.070 Enter white x and y: 0.283 0.298 X = 0.38106154R + 0.32025711G + 0.24834578B Y = 0.20729748R + 0.68054637G + 0.11215616B Z = 0.02133945R + 0.14297193G + 1.24172890B When I don't, I cheat and use Y = .30R + .59G + .11B, even though it doesn't correspond to any device you'll likely run across. -Jonathan hue@island.COM