Use of uppercase or lowercase does not matter. XLookupColor and XParseColor can generate BadColor error. For backward compatibility, an older syntax for RGB Device is supported, but its continued use is not encouraged. The R, G, and B represent single hexadecimal digits. The input format for these values is an optional sign, a string of numbers pos sibly containing a decimal point, and an optional exponent field containing an E or e followed by a possibly signed integer string.
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.