code: public static String toRGB(Color color)
      {
          String rgb = "#";
          rgb += formatAsHex( color.getRed() );
          rgb += formatAsHex( color.getGreen() );
          rgb += formatAsHex( color.getBlue() );
          return rgb;
      }
docs: <p>toRGB.</p>
  
  @param color a {@link java.awt.Color} object.
  @return a {@link java.lang.String} object.