Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!purdue!bu-cs!bloom-beacon!EXPO.LCS.MIT.EDU!jim From: jim@EXPO.LCS.MIT.EDU (Jim Fulton) Newsgroups: comp.windows.x Subject: Re: color map question Message-ID: <8806161400.AA24624@EXPO.LCS.MIT.EDU> Date: 16 Jun 88 14:00:00 GMT References: <460@ole.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 43 >> [the allocating colors misexample] > > There is a bit of misunderstanding here. To say the least. For reference, the indicated code was attempting to allocate ncells*2^nplanes = 256*2^8 = 65536 color cells. Ugh. > [this was asking about why XGetStandardColormap wasn't working] > > I would appreciate it if anyone out there could point out what > we are doing wrong. Two things: 1. The publicly-available window managers don't create any standard colormaps, so there aren't any to fetch. Unless you have created a special program to load the colormaps, XGetStandardColormap won't work. See Section 9.2 of the Xlib manual and the ICCCM for more detailed information. 2. You were passing the colormap property type (XA_RGB_COLOR_MAP) instead of one of the standard colormap property names listed in Section 9.2.2 of the Xlib manual: XA_RGB_DEFAULT_MAP a "nice" collection of commonly-used colors XA_RGB_BEST_MAP the widest distribution of colors XA_RGB_RED_MAP XA_RGB_GREEN_MAP XA_RGB_BLUE_MAP ramps of the indicated colors XA_RGB_GRAY_MAP ramps of gray Jim Fulton MIT X Consortium