} else if (len == 6) {
r = Integer.parseInt(t.image.substring(i + 0, i + 2), 16);
g = Integer.parseInt(t.image.substring(i + 2, i + 4), 16);
b = Integer.parseInt(t.image.substring(i + 4, i + 6), 16);
} else {
throw new TestCSSParseException(MessageFormat.format(
pattern, new Object[] {t}),
this.getInputSource().getURI(), t.beginLine,
t.beginColumn, this.getGrammarUri());
}
// Turn into an "rgb()"
LexicalUnit lr = LexicalUnitImpl.createNumber(null, r);
LexicalUnit lc1 = LexicalUnitImpl.createComma(lr);
LexicalUnit lg = LexicalUnitImpl.createNumber(lc1, g);
LexicalUnit lc2 = LexicalUnitImpl.createComma(lg);
LexicalUnit lb = LexicalUnitImpl.createNumber(lc2, b);
return LexicalUnitImpl.createRgbColor(prev, lr);
}
catch (NumberFormatException ex)
{
throw new TestCSSParseException(MessageFormat.format(
pattern, new Object[] {t}),
this.getInputSource().getURI(), t.beginLine,
t.beginColumn, ex, this.getGrammarUri());
}
}