Package org.polyfrost.polyui.color
Class PolyColor.Mutable
-
- All Implemented Interfaces:
-
org.polyfrost.polyui.color.PolyColor.Mut
public class PolyColor.Mutable extends PolyColor implements PolyColor.Mut
-
-
Field Summary
Fields Modifier and Type Field Description private Floathueprivate <Error class: unknown class>saturationprivate <Error class: unknown class>brightnessprivate <Error class: unknown class>alphaprivate final transient Integerargbprivate final Integerrgbaprivate final Booleantransparentprivate final Integerrprivate final Integergprivate final Integerbprivate final Integera
-
Constructor Summary
Constructors Constructor Description PolyColor.Mutable(Float hue, Float saturation, Float brightness, Float alpha)
-
Method Summary
Modifier and Type Method Description final FloatgetHue()The hue of this color. final UnitsetHue(Float hue)final <Error class: unknown class>getSaturation()The saturation of this color. final Unit)>setSaturation(<Error class: unknown class> saturation)final <Error class: unknown class>getBrightness()The brightness of this color. final Unit)>setBrightness(<Error class: unknown class> brightness)final <Error class: unknown class>getAlpha()The alpha of this color. final Unit)>setAlpha(<Error class: unknown class> alpha)final IntegergetArgb()return an integer representation of this color. PolyColor.Mutablerecolor(PolyColor to)-
-
Method Detail
-
getHue
final Float getHue()
The hue of this color. Can be any value, but is
mod 360, so values are always between 0 and 360.
-
getSaturation
final <Error class: unknown class> getSaturation()
The saturation of this color. Clamped between
0f..1f.
-
setSaturation
final Unit )>setSaturation(<Error class: unknown class> saturation)
-
getBrightness
final <Error class: unknown class> getBrightness()
The brightness of this color. Clamped between
0f..1f.
-
setBrightness
final Unit )>setBrightness(<Error class: unknown class> brightness)
-
getAlpha
final <Error class: unknown class> getAlpha()
The alpha of this color. Clamped between
0f..1f.
-
setAlpha
final Unit )>setAlpha(<Error class: unknown class> alpha)
-
getArgb
final Integer getArgb()
return an integer representation of this color. Utilizes bit-shifts to store the color as one 32-bit integer, like so:
0bAAAAAAAARRRRRRRRGGGGGGGGBBBBBBBBaka0xAARRGGBB
-
recolor
PolyColor.Mutable recolor(PolyColor to)
-
-
-
-