Modifier and Type | Field and Description |
---|---|
double |
blue
rgb blue
|
double |
green
rgb green
|
java.lang.String |
hexvalue
the hex value
|
double |
red
rgb red
|
Modifier and Type | Method and Description |
---|---|
static Colors |
findColorByHex(java.lang.String hex)
Find the color by the hex value
|
static Colors |
findColorByName(java.lang.String name)
Find the color by name
|
static double |
hexBlue(java.lang.String color)
Blue part of the hex
|
static double |
hexGreen(java.lang.String color)
Green part of the hex
|
static double |
hexRed(java.lang.String color)
Red part of the hex
|
static Colors |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Colors[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Colors WHITE
public static final Colors BLACK
public final java.lang.String hexvalue
public final double red
public final double green
public final double blue
public static Colors[] values()
for (Colors c : Colors.values()) System.out.println(c);
public static Colors valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static double hexRed(java.lang.String color)
color
- the colorpublic static double hexGreen(java.lang.String color)
color
- the colorpublic static double hexBlue(java.lang.String color)
color
- the colorpublic static Colors findColorByHex(java.lang.String hex)
hex
- the hex valuepublic static Colors findColorByName(java.lang.String name)
name
- the name