java.lang.Object
me.andreasmelone.glowingeyes.common.util.Color
All Implemented Interfaces:
Serializable, Cloneable

public class Color extends Object implements Serializable, Cloneable
An alternative to AWTs Color class. Using AWT may lead to problems in the future, so this class was made as an alternative to it.
See Also:
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<Color> CODEC
    • WHITE

      public static final Color WHITE
    • LIGHT_GRAY

      public static final Color LIGHT_GRAY
    • GRAY

      public static final Color GRAY
    • DARK_GRAY

      public static final Color DARK_GRAY
    • BLACK

      public static final Color BLACK
    • RED

      public static final Color RED
    • PINK

      public static final Color PINK
    • ORANGE

      public static final Color ORANGE
    • YELLOW

      public static final Color YELLOW
    • GREEN

      public static final Color GREEN
    • MAGENTA

      public static final Color MAGENTA
    • CYAN

      public static final Color CYAN
    • BLUE

      public static final Color BLUE
  • Constructor Details

    • Color

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

      @ConstructorProperties({"red","green","blue","alpha"}) public Color(int r, int g, int b, int a)
    • Color

      public Color(int rgb)
    • Color

      public Color(int rgba, boolean hasalpha)
    • Color

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

    • getRed

      public int getRed()
    • getGreen

      public int getGreen()
    • getBlue

      public int getBlue()
    • getAlpha

      public int getAlpha()
    • getRGB

      public int getRGB()
    • RGBtoHSB

      public static float[] RGBtoHSB(int r, int g, int b, float[] hsbvals)
    • HSBtoRGB

      public static int HSBtoRGB(float hue, float saturation, float brightness)
    • getHSBColor

      public static Color getHSBColor(float h, float s, float b)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

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

      public Color clone()
      Overrides:
      clone in class Object