Class Color

java.lang.Object
zombie.core.Color
All Implemented Interfaces:
Serializable

public final class Color extends Object implements Serializable
See Also:
  • Field Details

    • transparent

      public static final Color transparent
    • white

      public static final Color white
    • yellow

      public static final Color yellow
    • red

      public static final Color red
    • purple

      public static final Color purple
    • blue

      public static final Color blue
    • green

      public static final Color green
    • black

      public static final Color black
    • gray

      public static final Color gray
    • cyan

      public static final Color cyan
    • darkGray

      public static final Color darkGray
    • lightGray

      public static final Color lightGray
    • pink

      public static final Color pink
    • orange

      public static final Color orange
    • magenta

      public static final Color magenta
    • darkGreen

      public static final Color darkGreen
    • lightGreen

      public static final Color lightGreen
    • a

      public float a
    • b

      public float b
    • g

      public float g
    • r

      public float r
  • Constructor Details

    • Color

      public Color()
    • Color

      public Color(Color color)
    • Color

      public Color(float r, float g, float b)
    • Color

      public Color(float r, float g, float b, float a)
    • Color

      public Color(Color colorA, Color colorB, float delta)
    • 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

      public void setColor(Color colorA, Color colorB, float delta)
    • fromColor

      @Deprecated public void fromColor(int valueABGR)
      Deprecated.
    • setABGR

      public void setABGR(int valueABGR)
    • abgrToColor

      public static Color abgrToColor(int valueABGR, Color result)
    • colorToABGR

      public static int colorToABGR(Color val)
    • colorToABGR

      public static int colorToABGR(ColorInfo val)
    • 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

      public static Color random()
    • decode

      public static Color decode(String nm)
    • add

      public void add(Color c)
    • addToCopy

      public Color addToCopy(Color c)
    • brighter

      public Color brighter()
    • brighter

      public Color brighter(float scale)
    • darker

      public Color darker()
    • darker

      public Color darker(float scale)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • equalBytes

      public boolean equalBytes(Color other)
    • set

      public Color set(Color other)
    • set

      public Color set(float r, float g, float b)
    • set

      public Color set(float r, float g, float b, float a)
    • save

      public void save(ByteBuffer output)
    • load

      public void load(ByteBuffer input, int worldVersion)
    • 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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • multiply

      public Color multiply(Color c)
    • scale

      public Color scale(float value)
    • scaleCopy

      public Color scaleCopy(float value)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • interp

      public void interp(Color to, float delta, Color dest)
    • changeHSBValue

      public void changeHSBValue(float hFactor, float sFactor, float bFactor)
    • HSBtoRGB

      public static Color HSBtoRGB(float hue, float saturation, float brightness, Color result)
    • HSBtoRGB

      public static Color HSBtoRGB(float hue, float saturation, float brightness)
    • saveCompactNoAlpha

      public void saveCompactNoAlpha(ByteBuffer output) throws IOException
      Throws:
      IOException
    • loadCompactNoAlpha

      public void loadCompactNoAlpha(ByteBuffer input) throws IOException
      Throws:
      IOException
    • saveCompact

      public void saveCompact(ByteBuffer output) throws IOException
      Throws:
      IOException
    • loadCompact

      public void loadCompact(ByteBuffer input) throws IOException
      Throws:
      IOException