NAME
XStoreNamedColor — set RGB values of a read/write colorcell by color name.
SYNOPSIS
XStoreNamedColor(display, colormap, color, pixel, flags) Display ∗display; Colormap colormap; char ∗color; unsigned long pixel; int flags;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
colormapSpecifies the colormap.
colorSpecifies the color name string (for example, "red"). This cannot be in hex format (as used in XParseColor()). Upper or lower case is not important. The string should be in ISO LATIN-1 encoding, which means that the first 128 character codes are ASCII, and the second 128 character codes are for special characters needed in western languages other than English.
pixelSpecifies the entry in the colormap to store color in.
flagsSpecifies which red, green, and blue indexes are set.
DESCRIPTION
XStoreNamedColor() looks up the named color in the database, with respect to the screen associated with colormap, then stores the result in the read/write colorcell of colormap specified by pixel. If the color name is not in the Host Portable Character Encoding, the result is implementation-dependent. Upper or lower case in name does not matter. The flags argument, a bitwise OR of the constants DoRed, DoGreen, and DoBlue, determines which subfields within the pixel value in the cell are written.
For more information, see Volume One, Chapter 7, Color.
ERRORS
BadAccesspixel is unallocated or read-only.
BadColorInvalid colormap.
BadNamecolor is not in server’s color database.
BadValuepixel is not a valid index into colormap.
SEE ALSO
XDefaultColormap(), XDisplayCells(), XCopyColormapAndFree(), XCreateColormap(), XFreeColormap(), XGetStandardColormap(), XInstallColormap(), XListInstalledColormaps(), XSetStandardColormap(), XSetWindowColormap(), XUninstallColormap().
Xlib Reference Manual