Package org.polyfrost.polyui.color
Class PolyColor.Gradient
-
- All Implemented Interfaces:
public class PolyColor.Gradient extends PolyColor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPolyColor.Gradient.Mutablepublic classPolyColor.Gradient.Animatedpublic interfacePolyColor.Gradient.Type
-
Field Summary
Fields Modifier and Type Field Description private final Floathueprivate final Floatsaturationprivate final Floatbrightnessprivate final Floatalphaprivate final Integerargbprivate final Floathue2private final Floatsaturation2private final Floatbrightness2private final Floatalpha2private final Integerargb2private final Booleantransparentprivate final Integerr2private final Integerg2private final Integerb2private final Integera2private final PolyColorcolor1private final PolyColorcolor2private final PolyColor.Gradient.Typetypeprivate final Integerrprivate final Integergprivate final Integerbprivate final Integera
-
Constructor Summary
Constructors Constructor Description PolyColor.Gradient(PolyColor color1, PolyColor color2, PolyColor.Gradient.Type type)
-
Method Summary
Modifier and Type Method Description FloatgetHue()The hue of this color. FloatgetSaturation()The saturation of this color. FloatgetBrightness()The brightness of this color. FloatgetAlpha()The alpha of this color. IntegergetArgb()return an integer representation of this color. final FloatgetHue2()final FloatgetSaturation2()final FloatgetBrightness2()final FloatgetAlpha2()final IntegergetArgb2()BooleangetTransparent()final Integerred2()final Integergreen2()final Integerblue2()final Integeralpha2()PolyColorgetColor1()PolyColorgetColor2()final PolyColor.Gradient.TypegetType()final PolyColorget(Integer index)StringtoString()Booleanequals(Object other)IntegerhashCode()-
-
Constructor Detail
-
PolyColor.Gradient
PolyColor.Gradient(PolyColor color1, PolyColor color2, PolyColor.Gradient.Type type)
-
-
Method Detail
-
getHue
Float getHue()
The hue of this color. Can be any value, but is
mod 360, so values are always between 0 and 360.
-
getSaturation
Float getSaturation()
The saturation of this color. Clamped between
0f..1f.
-
getBrightness
Float getBrightness()
The brightness of this color. Clamped between
0f..1f.
-
getArgb
Integer getArgb()
return an integer representation of this color. Utilizes bit-shifts to store the color as one 32-bit integer, like so:
0bAAAAAAAARRRRRRRRGGGGGGGGBBBBBBBBaka0xAARRGGBB
-
getSaturation2
final Float getSaturation2()
-
getBrightness2
final Float getBrightness2()
-
getTransparent
Boolean getTransparent()
-
getType
final PolyColor.Gradient.Type getType()
-
-
-
-