Next: Changing Colors, Previous: Allocating Colors, Up: Colormap Functions [Contents][Index]
A CLX program can ask the X server to return the colors stored in allocated color cells. The server also maintains a dictionary of color names and their associated color values. CLX provides a function to look up the values for common colors by names such as "red", "purple", and so forth. The following paragraphs describe the CLX functions for returning the color values associated with color cells or with color names.
A colormap.
A stringable color name.
Returns the color associated by the X server with the given color name. The name must contain only ISO Latin-1 characters; case is not significant. The first value returned is the closest approximation to the requested color possible on the screen hardware. The second value returned is the true color value for the requested color.
Type color.
A colormap.
A sequence of pixel values.
A subtype of sequence that indicates the type of sequences returned.
Returns a sequence of the colors contained in the allocated cells of the colormap specified by the given pixels. The values returned for unallocated cells are undefined.
Type sequence of color.