class ColorFormatter {

    public String format(Object value)
    {
        String formatted = null;

        if (value instanceof Color)
        {
            Color color = (Color)value;
            if (myExportModel.getSelectedColorFormat() == ColorFormat.HEXADECIMAL)
            {
                formatted = Integer.toHexString(color.getRGB());
            }
            else
            {
                StringBuilder sb = new StringBuilder("color[r=").append(color.getRed()).append(",g=").append(color.getGreen())
                        .append(",b=").append(color.getBlue()).append(",a=").append(color.getAlpha()).append(']');
                formatted = sb.toString();
            }
        }

        return formatted;
    }

    public  ColorFormatter(ExportOptionsModel exportModel);

}