NAME
XcmsAllocColor — allocate a color specified in device-independent or device-dependent form.
SYNOPSIS
Status XcmsAllocColor(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 color to allocate and returns the pixel and color that is actually used in the colormap.
result_format
Specifies the desired color format for the returned color specification.
RETURNS
Zero on failure, non-zero on success.
AVAILABILITY
Release 5 and later.
DESCRIPTION
The XcmsAllocColor() function is similar to XAllocColor() except the color can be specified in any format supported by the color management system (e.g., CIEXYZ, CIELUV, RGB). The XcmsAllocColor() function ultimately calls XAllocColor() to allocate a read-only color cell (colormap entry) with the specified color. XcmsAllocColor() first converts the color specified to an RGB value and then passes this to XAllocColor. XcmsAllocColor() returns the pixel value of the color cell and the color specification actually allocated. This returned color specification is the result of converting the RGB value returned by XAllocColor() into the format specified by the result_format argument. If there is no interest in a returned color specification, unnecessary computation can be bypassed if result_format is set to XcmsRGBFormat. If this routine returns XcmsFailure, the color_in_out color specification is left unchanged.
STRUCTURES
The XcmsColor and XcmsColorFormat structures are shown on the XcmsColor reference page.
ERRORS
BadColor The colormap argument does not name a defined Colormap.
SEE ALSO
XcmsAllocNamedColor(), XcmsLookupColor(), XcmsQueryColor(), XcmsQueryColors(), XcmsStoreNamedColor.
Xlib Reference Manual