Path: utzoo!attcan!uunet!bloom-beacon!MYCROFT.MAYO.EDU!bmc From: bmc@MYCROFT.MAYO.EDU Newsgroups: comp.windows.x Subject: Re: Colormaps. Message-ID: <8910031252.AA02937@mycroft.mayo.edu> Date: 3 Oct 89 12:52:42 GMT References: <4092@ncsuvx.ncsu.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 28 I don't know if this wil help, but the code I use to set colormaps on a similar system is: 1) get a visual I can modify easily (usually pseudocolor) flag = XMatchVisualInfo (display, screen, 8, Pseudocolor, &VInfo); screen_visual = flag ? VInfo.visual : DefaultVisual (display, screen); 2) load colormap (set cells to the number of cells in your colormap) color.flags = DoRed | DoBlue | DoGreen; for (i = 0; i < cells; i++) { color.pixel = i; color.red = color.blue = color.green = 65535L * i / cells; /* grey scale example */ XStoreColor (display, cmap, &color); } Hope this helps. --Bruce ---------------------------------------------------- Bruce M. Cameron bmc@bru.mayo.edu Medical Sciences 1-14 (507) 284-3288 Mayo Foundation WD9CKW Rochester, MN 55905 ----------------------------------------------------