Path: utzoo!attcan!uunet!husc6!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: Color allocation Message-ID: <8907022037.AA05971@expire.lcs.mit.edu> Date: 2 Jul 89 20:37:14 GMT References: <3267@portia.Stanford.EDU> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 14 The documentation for XAllocColor says, (O'Reilly vol-2) " If a read-only color cell exists that matches the requested RGB value that cell is returned. If no matching cell exists and there are no unallocated cells the closest available colorcell that has already been allocated is returned" The O'Reilly documentation is incorrect on this point. For a dynamic visual (such as PseudoColor), the server transforms your requested RGB values into the closest values representable by the hardware. There must be an exact match of these RGB values with values stored in a colormap entry. For image processing applications, a Standard Colormap (as described in Xlib) is often better to use than individual color allocations.