Class HSLColor
Object
HSLColor
Support class for color functions, represents a color in HSL space (based on
http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/)
- Author:
- Andrea Aime - GeoSolutions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getAlpha()
double
getHue()
double
double
void
setAlpha
(double alpha) void
setHue
(double hue) void
setLightness
(double lightness) void
setSaturation
(double saturation) toRGB()
Turns the HSL representation into a RGB onetoString()
-
Constructor Details
-
HSLColor
public HSLColor(double hue, double saturation, double lightness) Builds a color based on HSLA components -
HSLColor
public HSLColor(double hue, double saturation, double lightness, double alpha) Builds a color based on HSLA components -
HSLColor
Builds the HSL representation of a color
-
-
Method Details
-
setHue
public void setHue(double hue) -
setSaturation
public void setSaturation(double saturation) -
setLightness
public void setLightness(double lightness) -
setAlpha
public void setAlpha(double alpha) -
getHue
public double getHue() -
getSaturation
public double getSaturation() -
getLightness
public double getLightness() -
getAlpha
public double getAlpha() -
toRGB
Turns the HSL representation into a RGB one -
toString
-