Class ColorIdentifiers

java.lang.Object
io.sf.carte.doc.style.css.property.ColorIdentifiers

public class ColorIdentifiers extends Object
CSS Color identifiers map.

Per CSS3 color spec, section 4.3.

  • Constructor Details

    • ColorIdentifiers

      public ColorIdentifiers()
  • Method Details

    • getInstance

      public static ColorIdentifiers getInstance()
      Gets the instance of this class.
      Returns:
      the singleton instance of this class.
    • getColor

      public String getColor(String keyword)
      Gets the color associated to the given keyword.
      Parameters:
      keyword - the color keyword (orange, blue, etc.). Must be lowercase.
      Returns:
      the corresponding #-starting hex color specification, or null if the keyword could not be recognized as a color.
    • isSystemColor

      public boolean isSystemColor(String identifier)
      Is this a system color identifier ?
      Parameters:
      identifier - the lowercase identifier to be tested.
      Returns:
      true if it is a system color identifier.
    • isColorIdentifier

      public boolean isColorIdentifier(String identifier)
      Is this a known color identifier ?

      transparent is not tested.

      Parameters:
      identifier - the lowercase identifier to be tested.
      Returns:
      true if it is a known color identifier.