public static String toHexString(Color color) {
		int rgb = color.getRGB() & 0xffffff; //mask off any alpha value
		int alpha = color.getAlpha();
		if (alpha != 0xff) {
			return String.format("#%06x%02x", rgb, alpha);
		}
		return String.format("#%06x", rgb);
	}
Returns the hex value string for the given color
@param color the color
@return the string
Ghidra/Framework/Gui/src/main/java/ghidra/util/WebColors.java