public class WebColors
extends java.util.HashMap
| 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 java.awt.Color |
getRGBColor(java.lang.String name)
Gives you a Color based on a name.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesprivate static final long serialVersionUID
public static final WebColors NAMES
public static java.awt.Color getRGBColor(java.lang.String name)
throws java.lang.IllegalArgumentException
name - a name such as black, violet, cornflowerblue or #RGB or #RRGGBB
or rgb(R,G,B)java.lang.IllegalArgumentException - if the String isn't a know representation of a color.