XcmsQueryColor()XcmsQueryColor()Name
XcmsQueryColor – obtain the color specification of a specified color‐
cell.
Synopsis
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 of the color cell to query, and returns
the color specification stored for that color cell.
result_format
Specifies the desired color format for the returned color
specifications.
Returns
Zero on failure, non-zero on success.
Availability
Release 5 and later.
DescriptionXcmsQueryColor() obtains the RGB value for the colormap cell specified
by the pixel field of the specified XcmsColor structure, and then con‐
verts the value to the target format specified by the result_format
argument. If the pixel is not a valid index into the specified col‐
ormap, a BadValue error results.
Errors
BadColor The colormap argument does not name a defined Colormap.
BadValue The specified pixel does not represent a valid color cell in
the specified colormap.
Structures
The XcmsColor structure and XcmsColorFormat type are shown on the Xcms‐
Color reference page.
See AlsoXcmsAllocColor(), XcmsAllocNamedColor(), XcmsStoreColor(), XcmsStore‐
Colors(), XcmsStoreNamedColor, XcmsQueryColors(), XcmsLookupColor(),
XAllocColor(), XAllocNamedColor(), XQueryColor(), XQueryColors(),
XStoreColor(), XStoreColors().
Xlib - Device-independent Color XcmsQueryColor()