Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!ico!attc!marbru From: marbru@attc.UUCP (Martin Brunecky) Newsgroups: comp.windows.x Subject: Re: Colormap dilemma Message-ID: <1239@attc.UUCP> Date: 13 Mar 91 16:41:32 GMT References: <1991Mar12.235227.28172@onecom> Reply-To: marbru@auto-trol.com (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 40 In article <1991Mar12.235227.28172@onecom> john@onecom.uucp (John Brinegar) writes: > >I have been having philosophical discussions concerning colormaps in X, and >I am interested in receiving a dose of conventional wisdom on this topic. > What about alternative: 4) Creating a private, writeable (pseudo color visual) color map. Allocating all 256 colors (or 16 for 4 bitplane system). Reserving the top 128 (8) colors for your colors. Copying the low 128 (8) colors from the default colormap into your private colormap. This gives you color cells you want, and significantly reduces the "technicolor" effect. In fact, it works pretty well if you only preserve (copy) something like 16-32 colors from the default map. Of course: - your private colors could go south if the focus moves out of your application. But at least your application would not destroy common controls (such as WM decorations) and the user will be able to navigate between applications. Also note that many servers do NOT change unallocated color cells when the colormap is swapped, so your "private" colors often remain in effect even when the default map is reloaded. - you may periodically update the copy of the default colormap in your private colormap (to reflect changes due to other apps). - you may consider a server which does NOT allocate colors using the bottom-up approach (I haven't seen one yet, but ...). There are (clumsy) ways to find out which color cells ARE currently allocated in the default colormap (depending on it's visual), so you can figure out how the server does it's allocation and locate your "private" cells appropriately. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky {...}sunpeaks!auto-trol!marbru (303) 252-2499 (sometimes also: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404