Status XcmsAllocNamedColor(display, colormap, color_string, color_screen_return, color_exact_return,
result_format)
Display *display;
Colormap colormap;
char *color_string;
XcmsColor *color_screen_return;
XcmsColor *color_exact_return;
XcmsColorFormat result_format;
display | Specifies the connection to the X server. |
colormap | Specifies the colormap. .ds St \ whose color definition structure is to be returned |
color_string | Specifies the color string\*(St. |
color_screen_return | Returns the pixel value of the color cell and color specification that actually is stored for that cell. |
color_exact_return | Returns the color specification parsed from the color string or parsed from the corresponding string found in a color name database. |
result_format | Specifies the color format for the returned color specifications (color_screen_return and color_exact_return arguments). If the format is XcmsUndefinedFormat and the color string contains a numerical color specification, the specification is returned in the format used in that numerical color specification. If the format is XcmsUndefinedFormat and the color string contains a color name, the specification is returned in the format used to store the color in the database. |
This function returns both the color specification as a result of parsing (exact specification) and the actual color specification stored (screen specification). This screen specification is the result of converting the RGB value returned by XAllocColor() into the format specified in result_format. If there is no interest in a returned color specification, unnecessary computation can be bypassed if result_format is set to XcmsRGBFormat. If color_screen_return and color_exact_return point to the same structure, the pixel field will be set correctly but the color values are undefined.
XcmsAllocNamedColor() can generate a BadColor error.
BadColor | A value for a Colormap argument does not name a defined Colormap. |