XcmsQueryColor and XcmsQueryColors can generate BadColor and BadValue errors. The XcmsLookupColor function looks up the string name of a color with respect to the screen associated with the spec ified colormap. It returns both the exact color values and the closest values provided by the screen with respect to the visual type of the specified colormap. If the color name is not in the Host Portable Character Encoding, the result is implementation-dependent. Use of uppercase or lowercase does not matter.
Some numeric value falls outside the range of values accepted by the request.
Any argument defined as a set of alternatives can generate this error.