java.lang.Object
io.sf.carte.doc.style.css.property.ColorIdentifiers
CSS Color identifiers map.
Per CSS3 color spec, section 4.3.
-
Method Summary
Modifier and TypeMethodDescriptionGets the color associated to the given keyword.static ColorIdentifiersGets the instance of this class.booleanisColorIdentifier(String identifier) Is this a known color identifier ?booleanisSystemColor(String identifier) Is this a system color identifier ?
-
Method Details
-
getInstance
Gets the instance of this class.- Returns:
- the singleton instance of this class.
-
getColor
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
Is this a system color identifier ?- Parameters:
identifier- the lowercase identifier to be tested.- Returns:
trueif it is a system color identifier.
-
isColorIdentifier
Is this a known color identifier ?This method tests the identifier against the known predefined color identifiers, including
transparent,currentcolorand system colors.- Parameters:
identifier- the lowercase identifier to be tested.- Returns:
trueif it is a known color identifier.
-