Path: utzoo!utgpu!watmath!att!ucbvax!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: Color to Grayscale mapping Message-ID: <8908071428.AA02515@expire.lcs.mit.edu> Date: 7 Aug 89 14:28:00 GMT References: <5631@b11.ingr.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 24 I have a question about how color allocation is done on a StaticGray color display. You get the "closest RGB values provided by the hardware". That's all the protocol says, for better or for worse. I remember reading in something that R G and B should all be set to the same value by the client because it cannot be sure which one of these three that the server will use as an intensity. This is only when storing (StoreColors) into a GrayScale map. finds the color that minimizes the following ... really happens? Yes!! Hey this is it but not documented ANYWHERE Because it's not part of the protocol specification. (Also, you missed an important part of the implementation, which is that ResolveColor gets called, and it can transform the RGB values. For example, in the server I'm typing at, it transforms to a gray value according to the 30/59/11 percentages. Since the GrayScale map happens to have been initialized similarly, the FindBestPixel code pretty much ends up actually looking for equality. Since ResolveColor can vary with each ddx, it's kinda hard to provide a single description of what the sample server chooses to do for this implementation-dependent detail.)