{
final ConverterAttributeSet attr = new ConverterAttributeSet();
if(colorConstant == StyleConstants.Foreground)
{
final CSSColorValue cssColorValue = new CSSColorValue((Color) value);
attr.addAttribute(ColorStyleKeys.COLOR.getName(), cssColorValue);
}
else if(colorConstant == StyleConstants.Background)
{
final CSSColorValue cssColorValue = new CSSColorValue((Color) value);
attr.addAttribute(BorderStyleKeys.BACKGROUND_COLOR.getName(), cssColorValue);
}
else
{
Log.debug(new Log.SimpleMessage("Unkown type of color attribute", colorConstant));