|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.style.AbstractModeledColor<HSLColor.Component>
com.guiseframework.style.HSLColor
public class HSLColor
Encapsulates a color value of the HSL color space.
| Nested Class Summary | |
|---|---|
static class |
HSLColor.Component
A color component of HSL. |
| Constructor Summary | |
|---|---|
HSLColor(double hue,
double saturation,
double lightness)
Creates an HSL color with the specified hue, saturation, and lightness component values in the range (0.0-1.0). |
|
HSLColor(int hue,
double saturation,
double lightness)
Creates an HSL color with the specified hue in the range (0-359), and saturation, and lightness component values in the range (0.0-1.0). |
|
| Method Summary | |
|---|---|
HSLColor |
asHSL()
|
RGBColor |
asRGB()
Converts this HSL color to an RGB color. |
double |
getHue()
|
double |
getHueDegrees()
Determines the value of the hue in degrees in the range (0.0-360.0]. |
double |
getLightness()
|
double |
getSaturation()
|
static HSLColor |
valueOf(java.lang.CharSequence charSequence)
Creates an HSL color from a string representation. |
| Methods inherited from class com.guiseframework.style.AbstractModeledColor |
|---|
checkComponentValue, equals, getAbsoluteComponent, getComponent, getValues, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HSLColor(int hue,
double saturation,
double lightness)
hue - The hue component as an integer value in the range (0-359).saturation - The saturation component in the range (0.0-1.0).lightness - The lightness component in the range (0.0-1.0).
java.lang.IllegalArgumentException - if the hue is outside the range (0-359), and/or if one of the other values is outside the range (0.0-1.0).
public HSLColor(double hue,
double saturation,
double lightness)
hue - The hue component.saturation - The saturation component.lightness - The lightness component.
java.lang.IllegalArgumentException - if one of the values is outside the range (0.0-1.0).| Method Detail |
|---|
public double getHue()
public double getHueDegrees()
public double getSaturation()
public double getLightness()
public HSLColor asHSL()
public RGBColor asRGB()
public static HSLColor valueOf(java.lang.CharSequence charSequence)
hsl(hue,saturation,lightness), with decimal representation with a depth of eight bits (0-255).hsl(hue%,saturation%,lightness%), with decimal component values multiplied by 100 (0.0-100.0%).
charSequence - The character sequence representation of an HSL color.
java.lang.NullPointerException - if the given string is null.
java.lang.IllegalArgumentException - if a color cannot be determined from the given string.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||