Package org.htmlunit.cssparser.dom
Class HSLColorImpl
java.lang.Object
org.htmlunit.cssparser.dom.AbstractColor
org.htmlunit.cssparser.dom.HSLColorImpl
- All Implemented Interfaces:
Serializable
Implementation of HSLColor.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
ConstructorDescriptionHSLColorImpl
(String function, LexicalUnit lu) Constructor that reads the values from the given chain of LexicalUnits. -
Method Summary
Modifier and TypeMethodDescriptiongetHue()
void
setHue
(CSSValueImpl hue) Sets the hue part to a new value.void
setLightness
(CSSValueImpl lightness) Sets the lightness part to a new value.void
setSaturation
(CSSValueImpl saturation) Sets the saturation part to a new value.toString()
Methods inherited from class org.htmlunit.cssparser.dom.AbstractColor
getAlpha, getAlphaPart, getNumberPercentagePart, setAlpha
-
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 CSSValueImpl
-
getSaturation
- Returns:
- the saturation part.
-
setSaturation
Sets the saturation part to a new value.- Parameters:
saturation
- the new CSSValueImpl
-
getLightness
- Returns:
- the lightness part.
-
setLightness
Sets the lightness part to a new value.- Parameters:
lightness
- the new CSSValueImpl
-
toString
-