| Modifier and Type | Method and Description |
|---|---|
Color |
getColor()
Converts the color back to a new RGB color.
|
int |
getH()
Returns the hue.
|
double |
getL()
Returns the lightness.
|
double |
getS()
Returns the saturation.
|
void |
setH(int h)
Updates the hue.
|
void |
setL(double l)
Updates the lightness.
|
void |
setS(double s)
Updates the saturation.
|
public void setH(int h)
h - the new hue in degrees. Is automatically fixed to match the 0..360 degree rangepublic void setS(double s)
s - the new saturation. Is automatically fixed to match the 0..1 rangepublic void setL(double l)
l - the new lightness. Is automatically fixed to match the 0..1 rangepublic int getH()
public double getS()
public double getL()
public Color getColor()
If the original color from which this HSL value was obtained had an non 0 alpha channel, this value is preserved for the color returned here.
Copyright © 2016. All rights reserved.