Package com.sksamuel.scrimage.color
Class HSLColor
- java.lang.Object
-
- com.sksamuel.scrimage.color.HSLColor
-
- All Implemented Interfaces:
Color
public class HSLColor extends java.lang.Object implements Color
Hue/Saturation/LightnessThe hue component should be between0.0and360.0 The saturation component should be between0.0and1.0 The lightness component should be between0.0and1.0 The alpha component should be between0.0and1.0
-
-
Field Summary
Fields Modifier and Type Field Description float
alpha
float
hue
float
lightness
float
saturation
-
Constructor Summary
Constructors Constructor Description HSLColor(float hue, float saturation, float lightness, float alpha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
HSLColor
toHSL()
RGBColor
toRGB()
Returns a conversion of this Color into an RGBColor.
-
-
-
Method Detail
-
toRGB
public RGBColor toRGB()
Description copied from interface:Color
Returns a conversion of this Color into an RGBColor. If this colour is already an instance of RGBColor then the same instance will be returned.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-