Class Argb
java.lang.Object
dev.boze.api.gui.util.Argb
Helpers for colors packed as ARGB ints.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intalpha(int argb) static intblend(int from, int to, float t) Blends two colors channel by channel, including alpha.static intblue(int argb) static intfade(int argb, float factor) Multiplies the alpha byfactor, 0 to 1.static intgreen(int argb) static intof(int alpha, int red, int green, int blue) static intred(int argb) static intwithAlpha(int argb, int alpha)
-
Method Details
-
alpha
public static int alpha(int argb) -
red
public static int red(int argb) -
green
public static int green(int argb) -
blue
public static int blue(int argb) -
of
public static int of(int alpha, int red, int green, int blue) -
withAlpha
public static int withAlpha(int argb, int alpha) - Parameters:
alpha- New alpha, 0 to 255
-
fade
public static int fade(int argb, float factor) Multiplies the alpha byfactor, 0 to 1. -
blend
public static int blend(int from, int to, float t) Blends two colors channel by channel, including alpha.- Parameters:
t- 0 givesfrom, 1 givesto
-