Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XQueryColors(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocColor(3X)

XCreateColormap(3X)

XStoreColors(3X)




XQueryColor(3X) XQueryColor(3X)
NAME XQueryColor, XQueryColors, XLookupColor - get color values SYNOPSIS XQueryColor (display, colormap, def-return) Display *display; Colormap colormap; XColor *def-return; XQueryColors (display, colormap, defs-return, ncolors) Display *display; Colormap colormap; XColor defs-return[]; int ncolors; Status XLookupColor (display, colormap, color-name, exact-def-return, screen-def-return) Display *display; Colormap colormap; char *color-name; XColor *exact-def-return, *screen-def-return; DESCRIPTION The XQueryColor and XQueryColors functions return the red, green, and blue (RGB) color values stored in the specified colormap for the pixel value passed in the pixel member of the XColor structure(s). The values returned for an unallo- cated entry are undefined. The XQueryColor and XQueryColors functions also set the flags member in the XColor structure to all three colors. The XLookupColor function looks up the string name of a color with respect to the screen associated with the speci- fied colormap. It then returns both the exact color values as well as the closest values provided by the screen, with respect to the visual type of the specified colormap. You should use ISO Latin-1 encoding; case is ignored. XLookup- Color returns nonzero if the name exists in the color data- base, and zero if it does not exist. Arguments These functions accept the following arguments: colormap Specifies the colormap ID. color-name Specifies the color name string (for example, red) whose color definition structure you want returned. def-return Specifies or returns the RGB values for the pixel November, 1990 1



XQueryColor(3X) XQueryColor(3X)
specified in the structure. defs-return Specifies or returns an array of color definition structures. display Specifies the connection to the X server. exact-def-return Returns the exact RGB values. ncolors Specifies the number of XColor structures in the color definition array. screen-def-return Returns the closest RGB values provided by the hardware. ERRORS BadColor A value for a Colormap argument does not name a de- fined colormap. BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied 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. The XQueryColor and XQueryColors functions can generate Bad- Color and BadValue errors. SEE ALSO XAllocColor(3X), XCreateColormap(3X), XStoreColors(3X)
Xlib - C Language Interface
2 November, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026