Enum ECSSColorName

java.lang.Object
java.lang.Enum<ECSSColorName>
com.helger.css.utils.ECSSColorName
All Implemented Interfaces:
com.helger.commons.name.IHasName, ICSSNamedColor, Serializable, Comparable<ECSSColorName>, java.lang.constant.Constable

@DeprecatedInCSS30 public enum ECSSColorName extends Enum<ECSSColorName> implements ICSSNamedColor
Contains a list of predefined color values in CSS 2.1.
These names are deprecated in CSS 3.0 in favour of the appearance property.
Source: http://www.w3.org/TR/css3-color/ chapter 4.5.1
Author:
Philip Helger
  • Enum Constant Details

  • Method Details

    • values

      public static ECSSColorName[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ECSSColorName valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      @Nonnull @Nonempty public String getName()
      Specified by:
      getName in interface com.helger.commons.name.IHasName
      Returns:
      The name of the color as to be used in CSS. Neither null nor empty.
    • getFromNameCaseInsensitiveOrNull

      @Nullable public static ECSSColorName getFromNameCaseInsensitiveOrNull(@Nullable String sName)
    • isDefaultColorName

      public static boolean isDefaultColorName(@Nullable String sName)
      Check if the passed color name is a default color name.
      Parameters:
      sName - The color name to check.
      Returns:
      true if the passed color name is a default color name, false if not.