public static final Color PURPLE = new Color(255, 0, 255, 255);
public static final Color TRANSPARENT = new Color(0, 0, 0, 0);
- public final int r, g, b;
+ /**
+ * Red component. 0-255.
+ */
+ public final int r;
+
+ /**
+ * Green component. 0-255.
+ */
+ public final int g;
+
+ /**
+ * Blue component. 0-255.
+ */
+ public final int b;
/**
- * <pre>
- * 255 is opaque.
- * 0 is transparent.
- * </pre>
+ * Alpha component.
+ * 0 - transparent.
+ * 255 - opaque.
*/
public int a;
}
/**
- * <pre>
- * Supported formats are:
- *
- * RGB
- * RGBA
- * RRGGBB
- * RRGGBBAA
- * </pre>
+ * @param colorHexCode color code in hex format.
+ * Supported formats are:
+ * <pre>
+ * RGB
+ * RGBA
+ * RRGGBB
+ * RRGGBBAA
+ * </pre>
*/
public Color(String colorHexCode) {
switch (colorHexCode.length()) {