protected String colorToRGB(final Color color){
  return String.format("#%02x%02x%02x",color.getRed(),color.getGreen(),color.getBlue());
}

protected String colorToRGB ( final Color color ) { return String . format ( "#%02x%02x%02x" , color . getRed ( ) , color . getGreen ( ) , color . getBlue ( ) ) ; }
convert a color to a css color attribute value .
