private static ColorCode color2ColorCode(Color c) throws Exception {
		if (c == Color.RED)
			return ColorCode.Red;
		else if (c == Color.BLUE)
			return ColorCode.Blue;
		else if (c == Color.GREEN)
			return ColorCode.Green;
		else if ((c.getRGB()&0xffffff) == 0xff4800)
			return ColorCode.Orange;
		else if (c == Color.YELLOW)
			return ColorCode.Yellow;
		else if (c == Color.CYAN)
			return ColorCode.Cyan;
		else if (c == Color.MAGENTA)
			return ColorCode.Magenta;
		else if (c == Color.PINK)
			return ColorCode.Pink;
		else if (c == Color.WHITE)
			return ColorCode.White;
		throw new Exception();
	}