Package pkg.exoad.swiggie
Class SwColor
java.lang.Object
pkg.exoad.swiggie.SwColor
- All Implemented Interfaces:
SwArithmetic<SwColor>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final SwClampedValue<Integer>
private final SwClampedValue<Integer>
private final SwClampedValue<Integer>
static int
static int
private final SwClampedValue<Integer>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SwColor
acquireFromARGB
(int argb) static SwColor
acquireFromHEX
(String hex) static SwColor
acquireFromRGB
(int rgb) static SwColor
acquireFromRGB
(int r, int g, int b) static SwColor
acquireFromRGBA
(int r, int g, int b, int a) static SwClampedValue<Integer>
acquireRGBACompliant
(int value) float[]
int
getAlpha()
int
getBlue()
int
getGreen()
int
getRed()
int
getRGB()
int
getRGBA()
float
float
float
float
void
setAlpha
(int alpha) void
setBlue
(int blue) void
setGreen
(int green) void
setRed
(int red)
-
Field Details
-
MAX_VALUE
public static int MAX_VALUE -
MIN_VALUE
public static int MIN_VALUE -
red
-
green
-
blue
-
alpha
-
-
Constructor Details
-
SwColor
private SwColor() -
SwColor
private SwColor(int r, int g, int b, int a) -
SwColor
private SwColor(int argb)
-
-
Method Details
-
acquireRGBACompliant
-
acquireFromRGB
-
acquireFromRGB
-
acquireFromHEX
-
acquireFromARGB
-
acquireFromRGBA
-
getRGBA
public int getRGBA() -
getRGB
public int getRGB() -
getRed
public int getRed() -
getGreen
public int getGreen() -
getBlue
public int getBlue() -
getAlpha
public int getAlpha() -
setRed
public void setRed(int red) -
setGreen
public void setGreen(int green) -
setBlue
public void setBlue(int blue) -
setAlpha
public void setAlpha(int alpha) -
normalizeGreen
public float normalizeGreen() -
normalizeRed
public float normalizeRed() -
normalizeBlue
public float normalizeBlue() -
normalizeAlpha
public float normalizeAlpha() -
asFloatArray
public float[] asFloatArray() -
add
- Specified by:
add
in interfaceSwArithmetic<SwColor>
-
subtract
- Specified by:
subtract
in interfaceSwArithmetic<SwColor>
-
multiply
- Specified by:
multiply
in interfaceSwArithmetic<SwColor>
-
divide
- Specified by:
divide
in interfaceSwArithmetic<SwColor>
-