XFreeColors()XFreeColors()NameXFreeColors – free colormap cells or planes.
Synopsis
XFreeColors(display, colormap, pixels, npixels, planes)
Display *display;
Colormap colormap;
unsigned long pixels[];
int npixels;
unsigned long planes;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
colormap Specifies the colormap.
pixels Specifies an array of pixel values.
npixels Specifies the number of pixels.
planes Specifies the planes you want to free.
DescriptionXFreeColors() frees the cells whose values are computed by ORing
together subsets of the planes argument with each pixel value in the
pixels array.
If the cells are read/write, they become available for reuse, unless
they were allocated with XAllocColorPlanes(), in which case all the
related pixels may need to be freed before any become available.
If the cells were read-only, they become available only if this is the
last client to have allocated those shared cells.
For more information, see Volume One, Chapter 7, Color.
Errors
BadAccess Attempt to free a colorcell not allocated by this client
(either unallocated or allocated by another client).
BadColor colormap is invalid.
BadValue A pixel value is not a valid index into colormap.
Note: if more than one pixel value is in error, the one reported is
arbitrary.
See AlsoXBlackPixel(), XWhitePixel(), XAllocColor(), XAllocColorCells(), XAl‐
locColorPlanes(), XAllocNamedColor(), XLookupColor(), XParseColor(),
XQueryColor(), XQueryColors(), XStoreColor(), XStoreColors(), XStore‐
NamedColor().
Xlib - Color Cells XFreeColors()