XcmsQueryColor

Syntax

Status XcmsQueryColor(display, colormap, color_in_out, result_format)
      Display *display;
      Colormap colormap;
      XcmsColor *color_in_out;
      XcmsColorFormat result_format;

Arguments

display Specifies the connection to the X server.
colormap Specifies the colormap.
color_in_out Specifies the pixel member that indicates the color cell to query. The color specification stored for the color cell is returned in this XcmsColor structure.
result_format Specifies the color format for the returned color specification.

Description

The XcmsQueryColor() function obtains the RGB value for the pixel value in the pixel member of the specified XcmsColor structure and then converts the value to the target format as specified by the result_format argument. If the pixel is not a valid index in the specified colormap, a BadValue error results.

XcmsQueryColor() can generate BadColor and BadValue errors.

Diagnostics

BadColor A value for a Colormap argument does not name a defined Colormap.
BadValue Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.

See also

XcmsAllocColor(), XcmsLookupColor(), XcmsQueryColors(), XcmsStoreColor(), "Modifying and Querying Colormap Cells".
Christophe Tronche, [email protected]