Path: utzoo!yunexus!hydroesm!jtsv16!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Colormap Size of DirectColor Visual Message-ID: <9005291239.AA11784@expire.lcs.mit.edu> Date: 29 May 90 12:39:25 GMT Article-I.D.: expire.9005291239.AA11784 References: <1990May29.020019.22162@eplrx7.uucp> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 12 Xdpyinfo reports that the DirectColor visual on a Sun has 8 colormap entries. Yet I can store 256 colors with XStoreColors. Can someone explain this "apparent" discrepency? For DirectColor and TrueColor, you get the size of a "subfield", not the total size of the map. Read the protocol specification, end of Section 8: The colormap-entries defines the number of available colormap entries in a newly created colormap. For DirectColor and TrueColor, this will usually be 2 to the power of the maximum number of bits set to 1 in red-mask, green-mask, and blue-mask.