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.
|
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, 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
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.Copyright © 2020. All rights reserved.