Package pkg.exoad.swiggie
Class SwColor
java.lang.Object
pkg.exoad.swiggie.SwColor
- All Implemented Interfaces:
SwArithmetic<SwColor>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SwClampedValue<Integer>private final SwClampedValue<Integer>private final SwClampedValue<Integer>static intstatic intprivate final SwClampedValue<Integer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SwColoracquireFromARGB(int argb) static SwColoracquireFromHEX(String hex) static SwColoracquireFromRGB(int rgb) static SwColoracquireFromRGB(int r, int g, int b) static SwColoracquireFromRGBA(int r, int g, int b, int a) static SwClampedValue<Integer>acquireRGBACompliant(int value) float[]intgetAlpha()intgetBlue()intgetGreen()intgetRed()intgetRGB()intgetRGBA()floatfloatfloatfloatvoidsetAlpha(int alpha) voidsetBlue(int blue) voidsetGreen(int green) voidsetRed(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:
addin interfaceSwArithmetic<SwColor>
-
subtract
- Specified by:
subtractin interfaceSwArithmetic<SwColor>
-
multiply
- Specified by:
multiplyin interfaceSwArithmetic<SwColor>
-
divide
- Specified by:
dividein interfaceSwArithmetic<SwColor>
-