*/
public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser)
throws Exception {
String name = getName();
HTMLTranslator htmlTranslator = parser.getResolver().getHTMLTranslator();
String translatedName;
if (htmlTranslator instanceof ClientResource) {
ClientResource cr = (ClientResource) htmlTranslator;
Color color = cr.getColor(name);
StringBuffer result = new StringBuffer(7);
String s = Integer.toHexString(color.getRed());
result.append('#');
if (s.length() == 1) {
result.append('0');
} else
result.append(s);
s = Integer.toHexString(color.getGreen());
if (s.length() == 1) {
result.append('0');
} else
result.append(s);
s = Integer.toHexString(color.getBlue());
if (s.length() == 1) {
result.append('0');
} else
result.append(s);
translatedName = result.toString();
} else {
translatedName = htmlTranslator.translate(name + ".color");
}
parser.getOut().write(translatedName.getBytes());
}