public class WebColors extends HashMap<String,int[]>
CSS4 Implementation based on: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
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, valuesequals, hashCode, toStringpublic static final WebColors NAMES
public static Color getRGBColor(String name) throws IllegalArgumentException
name - the css color name to convert. You can use CSS4 color values
IllegalArgumentException - if the String isn't a know representation of a color.Copyright © 2024. All rights reserved.