public class WebColors extends HashMap<String,int[]>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static WebColors |
NAMES
HashMap containing all the names and corresponding color values.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
WebColors() |
Modifier and Type | Method and Description |
---|---|
static BaseColor |
getRGBColor(String name)
Gives you a BaseColor based on a name.
|
private static boolean |
missingHashColorFormat(String colStr)
A web color string without the leading # will be 3 or 6 characters long
and all those characters will be hex digits.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
private static final long serialVersionUID
public WebColors()
private static boolean missingHashColorFormat(String colStr)
colStr
- A non-null, lower case string that might describe an RGB color in hex.public static BaseColor getRGBColor(String name) throws IllegalArgumentException
name
- a name such as black, violet, cornflowerblue or #RGB or #RRGGBB
or RGB or RRGGBB or rgb(R,G,B)IllegalArgumentException
- if the String isn't a know representation of a color.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses