Package org.htmlunit.cssparser.dom
Class RGBColorImpl
java.lang.Object
org.htmlunit.cssparser.dom.AbstractColor
org.htmlunit.cssparser.dom.RGBColorImpl
- All Implemented Interfaces:
Serializable
Implementation of RGBColor.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
ConstructorDescriptionRGBColorImpl
(String function, LexicalUnit lu) Constructor that reads the values from the given chain of LexicalUnits. -
Method Summary
Modifier and TypeMethodDescriptiongetBlue()
getBlue.getGreen()
getGreen.getRed()
getRed.void
setBlue
(CSSValueImpl blue) Sets the blue part to a new value.void
setGreen
(CSSValueImpl green) Sets the green part to a new value.void
setRed
(CSSValueImpl red) Sets the red part to a new value.toString()
Methods inherited from class org.htmlunit.cssparser.dom.AbstractColor
getAlpha, getAlphaPart, getNumberPercentagePart, setAlpha
-
Constructor Details
-
RGBColorImpl
Constructor that reads the values from the given chain of LexicalUnits.- Parameters:
function
- the name of the function; rgb or rgbalu
- the values- Throws:
DOMException
- in case of error
-
-
Method Details
-
getRed
getRed.
- Returns:
- the red part.
-
setRed
Sets the red part to a new value.- Parameters:
red
- the new CSSValueImpl
-
getGreen
getGreen.
- Returns:
- the green part.
-
setGreen
Sets the green part to a new value.- Parameters:
green
- the new CSSValueImpl
-
getBlue
getBlue.
- Returns:
- the blue part.
-
setBlue
Sets the blue part to a new value.- Parameters:
blue
- the new CSSValueImpl
-
toString
-