Color (String format) { if ("PNG".equals(format)) { return PNG_COLOR; } else if ("GIF".equals(format)) { return GIF_COLOR; } else if ("JPG".equals(format) || "JPEG".equals(format)) { return JPG_COLOR; } else if ("BMP".equals(format) || "WBMP".equals(format)) { return BMP_COLOR; } return Color.BLACK; }