Package org.htmlunit.cssparser.dom
Class LCHColorImpl
java.lang.Object
org.htmlunit.cssparser.dom.AbstractColor
org.htmlunit.cssparser.dom.LCHColorImpl
- All Implemented Interfaces:
Serializable
Implementation of LCHColor and OKLCHColor.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
ConstructorDescriptionLCHColorImpl
(String function, LexicalUnit lu) Constructor that reads the values from the given chain of LexicalUnits. -
Method Summary
Modifier and TypeMethodDescriptiongetHue()
void
setChroma
(CSSValueImpl chroma) Sets the chroma part to a new value.void
setHue
(CSSValueImpl hue) Sets the hue part to a new value.void
setLightness
(CSSValueImpl lightness) Sets the lightness part to a new value.toString()
Methods inherited from class org.htmlunit.cssparser.dom.AbstractColor
getAlpha, getAlphaPart, getNumberPercentagePart, setAlpha
-
Constructor Details
-
LCHColorImpl
Constructor that reads the values from the given chain of LexicalUnits.- Parameters:
function
- the name of the function; lch or oklchlu
- the values- Throws:
DOMException
- in case of error
-
-
Method Details
-
getLightness
- Returns:
- the lightness part.
-
setLightness
Sets the lightness part to a new value.- Parameters:
lightness
- the new CSSValueImpl
-
getChroma
- Returns:
- the chroma part.
-
setChroma
Sets the chroma part to a new value.- Parameters:
chroma
- the new CSSValueImpl
-
getHue
- Returns:
- the hue part.
-
setHue
Sets the hue part to a new value.- Parameters:
hue
- the new CSSValueImpl
-
toString
-