Class Color
java.lang.Object
me.andreasmelone.glowingeyes.common.util.Color
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Colorstatic final Colorstatic final com.mojang.serialization.Codec<Color> static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanintgetAlpha()intgetBlue()intgetGreen()static ColorgetHSBColor(float h, float s, float b) intgetRed()intgetRGB()inthashCode()static intHSBtoRGB(float hue, float saturation, float brightness) static float[]RGBtoHSB(int r, int g, int b, float[] hsbvals) toString()
-
Field Details
-
CODEC
-
WHITE
-
LIGHT_GRAY
-
GRAY
-
DARK_GRAY
-
BLACK
-
RED
-
PINK
-
ORANGE
-
YELLOW
-
GREEN
-
MAGENTA
-
CYAN
-
BLUE
-
-
Constructor Details
-
Color
public Color(int r, int g, int b) -
Color
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-