Class Color
java.lang.Object
zombie.core.Color
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorfloatstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorfloatstatic final Colorstatic final Colorstatic final Colorstatic final Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorabgrToColor(int valueABGR, Color result) voidstatic intblendABGR(int valueABGR, int targetABGR) static intblendBGR(int valueABGR, int targetABGR) brighter()brighter(float scale) voidchangeHSBValue(float hFactor, float sFactor, float bFactor) static intcolorToABGR(float r, float g, float b, float a) static intcolorToABGR(Color val) static intcolorToABGR(ColorInfo val) darker()darker(float scale) static ColorbooleanequalBytes(Color other) booleanvoidfromColor(int valueABGR) Deprecated.intgetAlpha()intstatic floatgetAlphaChannelFromABGR(int valueABGR) floatfloatgetB()intgetBlue()intstatic floatgetBlueChannelFromABGR(int valueABGR) floatfloatgetG()intgetGreen()intstatic floatgetGreenChannelFromABGR(int valueABGR) floatfloatgetR()intgetRed()intstatic floatgetRedChannelFromABGR(int valueABGR) floatinthashCode()static ColorHSBtoRGB(float hue, float saturation, float brightness) static Colorvoidstatic intlerpABGR(int colA, int colB, float alpha) voidload(ByteBuffer input, int worldVersion) voidloadCompact(ByteBuffer input) voidloadCompactNoAlpha(ByteBuffer input) static intmultiplyABGR(int valueABGR, int multiplierABGR) static intmultiplyBGR(int valueABGR, int multiplierABGR) static Colorrandom()voidsave(ByteBuffer output) voidsaveCompact(ByteBuffer output) voidsaveCompactNoAlpha(ByteBuffer output) scale(float value) scaleCopy(float value) set(float r, float g, float b) set(float r, float g, float b, float a) voidsetABGR(int valueABGR) static intsetAlphaChannelToABGR(int valueABGR, float a) static intsetBlueChannelToABGR(int valueABGR, float b) voidstatic intsetGreenChannelToABGR(int valueABGR, float g) static intsetRedChannelToABGR(int valueABGR, float r) static inttintABGR(int targetABGR, int tintABGR) toString()
-
Field Details
-
transparent
-
white
-
yellow
-
red
-
purple
-
blue
-
green
-
black
-
gray
-
cyan
-
darkGray
-
lightGray
-
pink
-
orange
-
magenta
-
darkGreen
-
lightGreen
-
a
public float a -
b
public float b -
g
public float g -
r
public float r
-
-
Constructor Details
-
Color
public Color() -
Color
-
Color
public Color(float r, float g, float b) -
Color
public Color(float r, float g, float b, float a) -
Color
-
Color
public Color(int r, int g, int b) -
Color
public Color(int r, int g, int b, int a) -
Color
public Color(int value)
-
-
Method Details
-
getR
public float getR() -
getG
public float getG() -
getB
public float getB() -
setColor
-
fromColor
Deprecated. -
setABGR
public void setABGR(int valueABGR) -
abgrToColor
-
colorToABGR
-
colorToABGR
-
colorToABGR
public static int colorToABGR(float r, float g, float b, float a) -
multiplyABGR
public static int multiplyABGR(int valueABGR, int multiplierABGR) -
multiplyBGR
public static int multiplyBGR(int valueABGR, int multiplierABGR) -
blendBGR
public static int blendBGR(int valueABGR, int targetABGR) -
blendABGR
public static int blendABGR(int valueABGR, int targetABGR) -
tintABGR
public static int tintABGR(int targetABGR, int tintABGR) -
lerpABGR
public static int lerpABGR(int colA, int colB, float alpha) -
getAlphaChannelFromABGR
public static float getAlphaChannelFromABGR(int valueABGR) -
getBlueChannelFromABGR
public static float getBlueChannelFromABGR(int valueABGR) -
getGreenChannelFromABGR
public static float getGreenChannelFromABGR(int valueABGR) -
getRedChannelFromABGR
public static float getRedChannelFromABGR(int valueABGR) -
setAlphaChannelToABGR
public static int setAlphaChannelToABGR(int valueABGR, float a) -
setBlueChannelToABGR
public static int setBlueChannelToABGR(int valueABGR, float b) -
setGreenChannelToABGR
public static int setGreenChannelToABGR(int valueABGR, float g) -
setRedChannelToABGR
public static int setRedChannelToABGR(int valueABGR, float r) -
random
-
decode
-
add
-
addToCopy
-
brighter
-
brighter
-
darker
-
darker
-
equals
-
equalBytes
-
set
-
set
-
set
-
save
-
load
-
getAlpha
public int getAlpha() -
getAlphaFloat
public float getAlphaFloat() -
getRedFloat
public float getRedFloat() -
getGreenFloat
public float getGreenFloat() -
getBlueFloat
public float getBlueFloat() -
getAlphaByte
public int getAlphaByte() -
getBlue
public int getBlue() -
getBlueByte
public int getBlueByte() -
getGreen
public int getGreen() -
getGreenByte
public int getGreenByte() -
getRed
public int getRed() -
getRedByte
public int getRedByte() -
hashCode
-
multiply
-
scale
-
scaleCopy
-
toString
-
interp
-
changeHSBValue
public void changeHSBValue(float hFactor, float sFactor, float bFactor) -
HSBtoRGB
-
HSBtoRGB
-
saveCompactNoAlpha
- Throws:
IOException
-
loadCompactNoAlpha
- Throws:
IOException
-
saveCompact
- Throws:
IOException
-
loadCompact
- Throws:
IOException
-