Class RGBColorImpl

java.lang.Object
org.htmlunit.cssparser.dom.AbstractColor
org.htmlunit.cssparser.dom.RGBColorImpl
All Implemented Interfaces:
Serializable

public class RGBColorImpl extends AbstractColor
Implementation of RGBColor.
Author:
Ronald Brill
See Also:
  • Constructor Details

    • RGBColorImpl

      public RGBColorImpl(String function, LexicalUnit lu) throws DOMException
      Constructor that reads the values from the given chain of LexicalUnits.
      Parameters:
      function - the name of the function; rgb or rgba
      lu - the values
      Throws:
      DOMException - in case of error
  • Method Details

    • getRed

      public CSSValueImpl getRed()

      getRed.

      Returns:
      the red part.
    • setRed

      public void setRed(CSSValueImpl red)
      Sets the red part to a new value.
      Parameters:
      red - the new CSSValueImpl
    • getGreen

      public CSSValueImpl getGreen()

      getGreen.

      Returns:
      the green part.
    • setGreen

      public void setGreen(CSSValueImpl green)
      Sets the green part to a new value.
      Parameters:
      green - the new CSSValueImpl
    • getBlue

      public CSSValueImpl getBlue()

      getBlue.

      Returns:
      the blue part.
    • setBlue

      public void setBlue(CSSValueImpl blue)
      Sets the blue part to a new value.
      Parameters:
      blue - the new CSSValueImpl
    • toString

      public String toString()
      Overrides:
      toString in class Object