XStoreColors

Syntax

XStoreColors(display, colormap, color, ncolors)
      Display *display;
      Colormap colormap;
      XColor color[];
      int ncolors;

Arguments

display Specifies the connection to the X server.
colormap Specifies the colormap.
color Specifies an array of color definition structures to be stored.
ncolors Specifies the number of XColor structures in the color definition array.

Description

The XStoreColors() function changes the colormap entries of the pixel values specified in the pixel members of the XColor structures. You specify which color components are to be changed by setting DoRed , DoGreen , and/or DoBlue in the flags member of the XColor structures. If the colormap is an installed map for its screen, the changes are visible immediately. XStoreColors() changes the specified pixels if they are allocated writable in the colormap by any client, even if one or more pixels generates an error. If a specified pixel is not a valid index into the colormap, a BadValue error results. If a specified pixel either is unallocated or is allocated read-only, a BadAccess error results. If more than one pixel is in error, the one that gets reported is arbitrary.

XStoreColors() can generate BadAccess , BadColor , and BadValue errors.

Diagnostics

BadAccess A client attempted to free a color map entry that it did not already allocate.
BadAccess A client attempted to store into a read-only color map entry.
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(), XQueryColor(), XStoreColor(), XStoreColors(), XStoreNamedColor(), "Modifying and Querying Colormap Cells".
Christophe Tronche, ch@tronche.com