Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XcmsQueryColor − obtain the color specification of a specified colorcell. 

Synopsis

Status XcmsQueryColor(display, colormap, color_in_out, result_format)

   Display *display;
   Colormap colormap;
   XcmsColor *color_in_out;
   XcmsColorFormat result_format;

Arguments

displaySpecifies the connection to the X server. 

colormapSpecifies the colormap. 

color_in_out
Specifies the pixel of the color cell to query, and returns the color specification stored for that color cell.

result_format
Specifies the desired color format for the returned color specifications.

Availability

Release 5 and later. 

Description

XcmsQueryColor() obtains the RGB value for the colormap cell specified by the pixel field of the specified XcmsColor structure, and then converts the value to the target format specified by the result_format argument.  If the pixel is not a valid index into the specified colormap, a BadValue error results. 

Errors

BadColor The colormap argument does not name a defined Colormap. 

BadValue The specified pixel does not represent a valid color cell in the specified colormap. 

Structures

The XcmsColor structure and XcmsColorFormat type are shown on the XcmsColor reference page. 

See Also

XcmsAllocColor(), XcmsStoreColor(), XcmsStoreColors(), XcmsQueryColors(), XcmsLookupColor(),
XAllocColor(), XQueryColor(), XQueryColors(), XStoreColor(), XStoreColors(). 

Copyright O’Reilly & Assoc.  —  

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