Module org.htmlunit

Class Color

java.lang.Object
org.htmlunit.html.impl.Color

public class Color extends Object
Our own implementation of color to be independent of awt (for this).
Author:
Ronald Brill
  • Constructor Details

    • Color

      public Color(int red, int green, int blue)
      Ctor (using an alpha of 255).
      Parameters:
      red - the red part
      green - the green part
      blue - the blue part
    • Color

      public Color(int red, int green, int blue, int alpha)
      Ctor.
      Parameters:
      red - the red part
      green - the green part
      blue - the blue part
      alpha - the alpha part
  • Method Details

    • getRed

      public int getRed()
      Returns:
      the red part
    • getGreen

      public int getGreen()
      Returns:
      the green part
    • getBlue

      public int getBlue()
      Returns:
      the blue part
    • getAlpha

      public int getAlpha()
      Returns:
      the alpha part
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object