Package guideme.color
Class Colors
java.lang.Object
guideme.color.Colors
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Colors
public Colors()
-
-
Method Details
-
hexToRgb
Converts a hexadecimal color string to a packed RGB or ARGB integer. If no alpha is given, assumes alpha 255. The order of colors in the hex string follows CSS notations (#RRGGBBAA or #RGBA).- Parameters:
hexColor
- The color string in hex format (with or without #)- Returns:
- The packed RGB value as an integer
- Throws:
IllegalArgumentException
- if the input format is invalid
-
argb
public static int argb(int a, int r, int g, int b) -
rgb
public static int rgb(int r, int g, int b) -
mono
public static int mono(int w)
-