Class HSLColorImpl
java.lang.Object
org.htmlunit.cssparser.dom.HSLColorImpl
- All Implemented Interfaces:
Serializable
Implementation of HSLColor.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHSLColorImpl(String function, LexicalUnit lu) Constructor that reads the values from the given chain of LexicalUnits. -
Method Summary
Modifier and TypeMethodDescriptiongetAlpha()getHue()voidsetAlpha(CSSValueImpl alpha) Sets the alpha part to a new value.voidsetHue(CSSValueImpl hue) Sets the hue part to a new value.voidsetLightness(CSSValueImpl lightness) Sets the lightness part to a new value.voidsetSaturation(CSSValueImpl saturation) Sets the saturation part to a new value.toString()
-
Constructor Details
-
HSLColorImpl
Constructor that reads the values from the given chain of LexicalUnits.- Parameters:
function- the name of the function; hsl or hslalu- the values- Throws:
DOMException- in case of error
-
-
Method Details
-
getHue
- Returns:
- the hue part.
-
setHue
Sets the hue part to a new value.- Parameters:
hue- the new CSSPrimitiveValue
-
getSaturation
- Returns:
- the saturation part.
-
setSaturation
Sets the saturation part to a new value.- Parameters:
saturation- the new CSSPrimitiveValue
-
getLightness
- Returns:
- the lightness part.
-
setLightness
Sets the lightness part to a new value.- Parameters:
lightness- the new CSSPrimitiveValue
-
getAlpha
- Returns:
- the alpha part.
-
setAlpha
Sets the alpha part to a new value.- Parameters:
alpha- the new CSSPrimitiveValue
-
toString
-