does a good color map viewer exist

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

6 posts / 0 new
Last post
does a good color map viewer exist

Submitted by orank on Sun, 12/16/2001 - 18:03. Developers
Hi ,

I my application creates privete visuals and colormaps. I would like to find a motif application that shows all the color cell in my colormap , or a application that shows the X servers currently installed colormaps.

There has to be a simple application that displays the colors and values of all the cells in a colormap.

Does any one know of such a application that is free ware, and can you send it to me , or post it at this folder.

I can really use help on this one , I spent a few days of trying and gut no success . . .

Thanks in advance
All the Best
oran

ICS_support

The colormap is a resource which is private to your client, like GC identifiers. Other applications don`t have access to it.

But applications do have access to the standard colormaps. I used to use something called cpicker for color display. There also used to be something called xshowcmap. See also http//www.motifzone.com/resources/man/xstdcmap.html for details about setting these colormaps to begin with via xstdcmap. You`ll find programs at http//www.x.org .

orank

Ok , I searched the web and found a few good colromap handles coloredit.c , colorpalette.c are very nice and they work on the X server difault color map.

I have one more question, when I have a colormap, how do I get its cell values ? how can I get cell number 1 (for example) from my private color map?

orank

Hi ,
I have one more question about this issue.
if I have a color in red green & blue values. how can I set a widget (like a button) to display my color. how do I convert the RGB value in to somthing the button can accept as background color

thanks a lot in advance
oran

ICS_support

The button needs a pixel value in the colormap it was created with -- that is, an index. You can locate the pixel value corresponding to RGB values by using http//www.motifzone.com/resources/man/XAllocColor.html . Or, if you don`t want a read-only value but a read-write value, you can take the RGB values and put them into a specific colormap at a specific pixel index using http//www.motifzone.com/resources/man/XStoreColor.html .

ICS_support

Sounds like you want XQueryColor ( http//www.motifzone.com/resources/man/XQueryColor.html ), which returns the RGB values for a specific pixel index into a colormap.

The Scheifler/Gettys book on the X Window System (the "Bible") has good, but dense, material on colormap allocation. The Oliver Jones book "Introduction to the X Window System" is more of a tutorial.