public class WebColors extends HashMap
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 Color |
getRGBColor(String name)
Gives you a Color based on a name.
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
private static final long serialVersionUID
public static final WebColors NAMES
public static Color getRGBColor(String name) throws IllegalArgumentException
name
- a name such as black, violet, cornflowerblue or #RGB or #RRGGBB
or rgb(R,G,B)IllegalArgumentException
- if the String isn't a know representation of a color.