XQueryColors

Syntax

XQueryColors(display, colormap, defs_in_out, ncolors)
      Display *display;
      Colormap colormap;
      XColor defs_in_out[];
      int ncolors;

Arguments

display Specifies the connection to the X server.
colormap Specifies the colormap.
defs_in_out Specifies and returns an array of color definition structures for the pixel specified in the structure.
ncolors Specifies the number of XColor structures in the color definition array.

Description

The XQueryColors() function returns the RGB value for each pixel in each XColor structure and sets the DoRed, DoGreen, and DoBlue flags in each structure.

XQueryColors() 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

XAllocColor(), XCreateColormap(), XLookupColor(), XParseColor(), XQueryColor(), XQueryColors(), XStoreColors(), "Modifying and Querying Colormap Cells".
Christophe Tronche, [email protected]