To store multiple RGB values in multiple colormap cells, use XStoreColors().
To store a color of arbitrary format in a single colormap cell, use XcmsStoreColor().
To store multiple colors of arbitrary format in multiple colormap cells, use XcmsStoreColors().
To store a color specified by name in a single colormap cell, use XStoreNamedColor().
The XQueryColor() and XQueryColors() functions take pixel values in the pixel member of XColor structures and store in the structures the RGB values for those pixels from the specified colormap. The values returned for an unallocated entry are undefined. These functions also set the flags member in the XColor structure to all three colors. If a pixel is not a valid index into the specified colormap, a BadValue error results. If more than one pixel is in error, the one that gets reported is arbitrary.
To query the RGB value of a single colormap cell, use XQueryColor().
To query the RGB values of multiple colormap cells, use XQueryColors().
To query the color of a single colormap cell in an arbitrary format, use XcmsQueryColor().
To query the color of multiple colormap cells in an arbitrary format, use XcmsQueryColors().