java.lang.Object
com.polarion.alm.shared.api.utils.html.Color

public final class Color extends Object
An HTML color.
Since:
3.18.1
  • Method Details

    • tryParse

      @NotNull public static Optional<Color> tryParse(@Nullable String colorString)
      Parses a HTML color string. Currently supported formats are HEX, RGB, and RGBA. Additional formats might be supported in the future. Examples: #00FF00, rgb(0, 255, 0), rgba(0, 255, 0, 0.4)
      Returns:
      optional with parsed color, or empty if the color could not be parsed.
    • withOpacity

      @NotNull public Color withOpacity(double opacity)
      Returns copy of this color with given opacity (alpha channel).
      Parameters:
      opacity - number between 0.0 (fully transparent) and 1.0 (fully opaque)
    • toString

      @NotNull public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

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