Package org.polyfrost.polyui.color
Class PolyColor
-
- All Implemented Interfaces:
public abstract class PolyColor(revised 1.3) The color used by PolyUI. It stores the color in the HSBA format, and can be converted to ARGB.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePolyColor.DynamicRepresents a color which is has some kind of operation that updates it based on time, for example, an animation.
public interfacePolyColor.Mutpublic interfacePolyColor.Animatablepublic classPolyColor.Staticpublic classPolyColor.Mutablepublic final classPolyColor.Chromapublic classPolyColor.Animatedpublic classPolyColor.Gradient
-
Field Summary
Fields Modifier and Type Field Description public final static PolyColorTRANSPARENTpublic final static PolyColorWHITEpublic final static PolyColorBLACKprivate final Floathueprivate final Floatsaturationprivate final Floatbrightnessprivate final Floatalphaprivate final Integerargbprivate final Integerrgbaprivate final Booleantransparentprivate final Integerrprivate final Integergprivate final Integerbprivate final Integera
-
Constructor Summary
Constructors Constructor Description PolyColor()
-
Method Summary
Modifier and Type Method Description abstract FloatgetHue()The hue of this color. abstract FloatgetSaturation()The saturation of this color. abstract FloatgetBrightness()The brightness of this color. abstract FloatgetAlpha()The alpha of this color. abstract IntegergetArgb()return an integer representation of this color. final IntegergetRgba()BooleangetTransparent()final Integerred()final Integergreen()final Integerblue()final Integeralpha()StringtoString()Booleanequals(Object other)IntegerhashCode()-
-
Method Detail
-
getHue
abstract Float getHue()
The hue of this color. Can be any value, but is
mod 360, so values are always between 0 and 360.
-
getSaturation
abstract Float getSaturation()
The saturation of this color. Clamped between
0f..1f.
-
getBrightness
abstract Float getBrightness()
The brightness of this color. Clamped between
0f..1f.
-
getArgb
abstract Integer getArgb()
return an integer representation of this color. Utilizes bit-shifts to store the color as one 32-bit integer, like so:
0bAAAAAAAARRRRRRRRGGGGGGGGBBBBBBBBaka0xAARRGGBB
-
getTransparent
Boolean getTransparent()
-
-
-
-