public class HtmlColor
extends java.lang.Object
| Constructor and Description |
|---|
HtmlColor() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Color |
getColor(java.lang.String name)
Parses a stringified color.
|
static java.lang.String |
getHexColor(java.lang.String name) |
static boolean |
isValidName(java.lang.String name) |
public static java.lang.String getHexColor(java.lang.String name)
public static boolean isValidName(java.lang.String name)
public static java.awt.Color getColor(java.lang.String name)
Colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one light source is 0 (hex #00). The highest value is 255 (hex #FF).
E.g:
Hex notation:
Symbolic color names:
Hex notation without leading hash:
name - a symbolic color name or a 6-digit hex color