class HTMLUtilities {

	public static String toHexString(Color color) {
		int r = color.getRed();
		int g = color.getGreen();
		int b = color.getBlue();

		StringBuilder buffy = new StringBuilder("#");
		buffy.append(StringUtilities.pad(Integer.toHexString(r), '0', 2));
		buffy.append(StringUtilities.pad(Integer.toHexString(g), '0', 2));
		buffy.append(StringUtilities.pad(Integer.toHexString(b), '0', 2));
		return buffy.toString().toUpperCase();
	}

}