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 float[] |
getRGBAColor(String name)
Gives an array of four floats that contain RGBA values, each value is between 0 and 1.
|
static DeviceRgb |
getRGBColor(String name)
Gives you a DeviceRgb 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 DeviceRgb getRGBColor(String name)
name
- a name such as black, violet, cornflowerblue or #RGB or #RRGGBB or RGB or RRGGBB or rgb(R,G,B)
public static float[] getRGBAColor(String name)
name
- a name such as black, violet, cornflowerblue or #RGB or #RRGGBB or RGB or RRGGBB or rgb(R,G,B) or rgb(R,G,B,A)
null
if parsing failed.
Copyright © 1998–2017 iText Group NV. All rights reserved.