Package games.stendhal.common.color
Class ARGB
java.lang.Object
games.stendhal.common.color.ARGB
Convenience methods for dealing with ARGB colors.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
ALPHA
public static final int ALPHAPosition of alpha component.- See Also:
- Constant Field Values
-
RED
public static final int REDPosition of red component.- See Also:
- Constant Field Values
-
GREEN
public static final int GREENPosition of green component.- See Also:
- Constant Field Values
-
BLUE
public static final int BLUEPosition of blue component.- See Also:
- Constant Field Values
-
-
Constructor Details
-
ARGB
public ARGB()
-
-
Method Details
-
splitRgb
public static void splitRgb(int rgb, int[] result)Split ARGB color to its 8 bit color components.- Parameters:
rgb
- red, green, blue valueresult
- array of length 4.
-
mergeRgb
public static int mergeRgb(int[] rgbData)Merge 8 bit ARGB color components to one integer color.- Parameters:
rgbData
- data to be merged. Array of length 4.- Returns:
- ARGB as an integer
-