public class GralColor extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
blue
Values 0..255 for the base colors.
|
java.lang.Object |
colorGuimpl
The color-instance for the implementation can be set from the implementation with the necessary type
to minimize the effort in dynamic instances.
|
int |
green
Values 0..255 for the base colors.
|
java.lang.String |
name
The unique short name for this color.
|
int |
red
Values 0..255 for the base colors.
|
protected int |
rgb
The rgb value, same value as red, green, blue.
|
protected java.lang.String |
usualNames
String with one or more usual names for this color, especially HTML names, X11 names.
|
static java.lang.String |
version
Version, history and license.
|
Modifier and Type | Method and Description |
---|---|
static GralColor |
getColor(int value) |
static GralColor |
getColor(int red,
int green,
int blue) |
static GralColor |
getColor(java.lang.String name)
Gets a color by its name.
|
java.lang.String |
getColorName() |
int |
getColorValue() |
static GralColor |
getStdColor(int color,
int brightness) |
boolean |
notUsed()
The color is not used till yet or it is changed.
|
int |
rgb() |
java.lang.String |
toString() |
java.lang.String |
usualNames() |
public int blue
public java.lang.Object colorGuimpl
public int green
public final java.lang.String name
public int red
protected int rgb
protected java.lang.String usualNames
public static final java.lang.String version
getColor(String)
now accepts a "0xhexa-Value" for a color name.
If the color name does not match, a magenta color is returned. The method returns a color in any case.
getColor(String)
and getColor(int)
with the colorContainer
from gridPanel/PropertiesGUI to this.
colorGuimpl
to get the graphic base system color instance if need.
public static GralColor getColor(java.lang.String name)
name
- The name or 0xhexapublic java.lang.String getColorName()
public int getColorValue()
public static GralColor getStdColor(int color, int brightness)
public boolean notUsed()
public int rgb()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String usualNames()