The
XSetRGBColormaps()
function replaces the RGB colormap definition in the specified property
on the named window.
If the property does not already exist,
XSetRGBColormaps()
sets the RGB colormap definition in the specified property
on the named window.
The property is stored with a type of RGB_COLOR_MAP and a format of 32.
Note that it is the caller's responsibility to honor the ICCCM
restriction that only RGB_DEFAULT_MAP contain more than one definition.
The
XSetRGBColormaps()
function usually is only used by window or session managers.
To create a standard colormap,
follow this procedure:
Open a new connection to the same server.
Grab the server.
See if the property is on the property list of the root window for the screen.
If the desired property is not present:
Create a colormap (unless you are using the default colormap of the screen).
Determine the color characteristics of the visual.
Allocate cells in the colormap (or create it with
AllocAll).
Call
XStoreColors()
to store appropriate color values in the colormap.