Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Can XAllocColor/XAllocNamedColor fail ? Message-ID: <2703@gazette.bcm.tmc.edu> Date: 9 Nov 90 20:24:17 GMT References: <1990Nov8.174617.10793@ecn.purdue.edu> <1990Nov8.114127@wsl.dec.com> <1990Nov9.144721.22509@cadence.com> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Distribution: na Organization: Baylor College of Medicine, Houston, Tx Lines: 15 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu What we do here is the following: We allocate approximate 92 colors in the default colormap. We distribute the colors as uniformly as possible : num_red = num_green = num_blue = cube_root(256) Which essentially gives us a DEFAULT_RGB colormap in the default colormap. Image processing applications then reuse the exact same colors, doing color dithering (Floyd/Steinberg). This allows us to have many applications displaying colorful images at the same time using the default colormap. -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776