code: public static String encode(Color color) {
          StringBuffer buffer = new StringBuffer("#");
          if (color.getRed() < 16) {
              buffer.append('0');
          }
          buffer.append(Integer.toString(color.getRed(), 16));
          if (color.getGreen() < 16) {
              buffer.append('0');
          }
          buffer.append(Integer.toString(color.getGreen(), 16));
          if (color.getBlue() < 16) {
              buffer.append('0');
          }
          buffer.append(Integer.toString(color.getBlue(), 16));
          return buffer.toString();
      }
docs: Converts a <CODE>Color</CODE> into a HTML representation of this <CODE>Color</CODE>.
  
  @param	color	the <CODE>Color</CODE> that has to be converted.
  @return	the HTML representation of this <COLOR>Color</COLOR>