com.itextpdf.text.html
Class WebColors
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,int[]>
com.itextpdf.text.html.WebColors
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,int[]>
public class WebColors
- extends HashMap<String,int[]>
This class is a HashMap that contains the names of colors as a key and the
corresponding BaseColor as value. (Source: Wikipedia
http://en.wikipedia.org/wiki/Web_colors )
- Author:
- blowagie
- See Also:
- Serialized Form
Field Summary |
static WebColors |
NAMES
HashMap containing all the names and corresponding color values. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
NAMES
public static final WebColors NAMES
- HashMap containing all the names and corresponding color values.
WebColors
public WebColors()
getRGBColor
public static BaseColor getRGBColor(String name)
throws IllegalArgumentException
- Gives you a BaseColor based on a name.
- Parameters:
name
- a name such as black, violet, cornflowerblue or #RGB or #RRGGBB
or RGB or RRGGBB or rgb(R,G,B)
- Returns:
- the corresponding BaseColor object. Never returns null.
- Throws:
IllegalArgumentException
- if the String isn't a know representation of a color.
Copyright © 2013. All Rights Reserved.