XStoreColors(3X) — X Version 11
NAME
XStoreColors, XStoreColor, XStoreNamedColor − set colors
SYNTAX
XStoreColors(display, cmap, color, ncolors)
Display ∗display;
Colormap cmap;
XColor color[];
int ncolors;
XStoreColor(display, cmap, color)
Display ∗display;
Colormap cmap;
XColor ∗color;
XStoreNamedColor(display, cmap, color, pixel, flags)
Display ∗display;
Colormap cmap;
char ∗color;
unsigned long pixel;
int flags;
ARGUMENTS
cmapSpecifies the color map ID.
colorSpecifies the pixel and RGB values.
colorSpecifies an array of color definition structures to be stored.
displaySpecifies the connection to the X server.
flagsSpecifies which red, green, and blue indexes are set.
ncolorsSpecifies the number of XColor structures in the color definition array.
pixelSpecifies the entry in the color map.
exact_def_return
Returns the exact colors for later use and sets the DoRed, DoGreen, and DoBlue flags.
DESCRIPTION
The XStoreColors function changes the color map entries of the pixel values specified in the pixel members of the XColor structures. .PN XStoreColors can generate BadAccess, BadColor, and BadValue errors.
The XStoreColor function changes the color map entry of the pixel value specified in the pixel member of the XColor structure. .PN XStoreColor can generate BadColor and BadValue errors.
The XStoreNamedColor function looks up the named color with respect to the screen associated with cmap and stores the result in cmap. .PN XStoreNamedColor can generate BadAccess, BadColor, BadName, 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.
BadName A font or color of the specified name does not exist.
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(3X), XCreateColormap(3X), XQueryColor(3X)
Xlib − C Language X Interface
1 March 1988