public class RMColor
extends Color
Modifier and Type | Field and Description |
---|---|
static RMColor |
black |
static RMColor |
blue |
static RMColor |
clear |
static RMColor |
clearWhite |
static RMColor |
cyan |
static RMColor |
darkGray |
static RMColor |
gray |
static RMColor |
green |
static RMColor |
lightBlue |
static RMColor |
lightGray |
static RMColor |
magenta |
static RMColor |
orange |
static RMColor |
pink |
static RMColor |
red |
static RMColor |
white |
static RMColor |
yellow |
Constructor and Description |
---|
RMColor()
Creates a plain black opaque color.
|
RMColor(double g)
Creates a color with the given gray value (0-1).
|
RMColor(double g,
double a)
Creates a color with the given gray and alpha values (0-1).
|
RMColor(double r,
double g,
double b)
Creates a color with the given red, green blue values (0-1).
|
RMColor(double r,
double g,
double b,
double a)
Creates a color with the given red, green, blue values (0-1).
|
RMColor(double c,
double m,
double y,
double k,
double a)
Creates a color with the given cyan, magenta, yellow, black and alpha values (0-1).
|
RMColor(int anRGB)
Creates an RMColor from the given AWT color.
|
RMColor(int r,
int g,
int b)
Creates a color with the given red, green blue values (0-1).
|
RMColor(int r,
int g,
int b,
int a)
Creates a color with the given red, green blue values (0-1).
|
RMColor(java.lang.String aHexString)
Creates a new color from the given hex string.
|
Modifier and Type | Method and Description |
---|---|
RMColor |
blend(RMColor aColor,
double aFraction)
Returns a color darker than this color (by this given fraction).
|
RMColor |
brighter()
Returns a color brighter than this color (blended with white).
|
RMColor |
darker()
Returns a color darker than this color (blended with black).
|
static RMColor |
get(Color c)
Returns a random color.
|
static RMColor |
get(java.lang.Object anObj)
Returns a color value for a given object.
|
static RMColor |
getRandom()
Returns a random color.
|
public static RMColor black
public static RMColor blue
public static RMColor cyan
public static RMColor darkGray
public static RMColor gray
public static RMColor green
public static RMColor lightGray
public static RMColor magenta
public static RMColor orange
public static RMColor pink
public static RMColor red
public static RMColor white
public static RMColor yellow
public static RMColor clear
public static RMColor lightBlue
public static RMColor clearWhite
public RMColor()
public RMColor(double g)
public RMColor(double g, double a)
public RMColor(double r, double g, double b)
public RMColor(int r, int g, int b)
public RMColor(int r, int g, int b, int a)
public RMColor(double r, double g, double b, double a)
public RMColor(double c, double m, double y, double k, double a)
public RMColor(int anRGB)
public RMColor(java.lang.String aHexString)
public RMColor brighter()
public RMColor darker()
public RMColor blend(RMColor aColor, double aFraction)
public static RMColor getRandom()
public static RMColor get(java.lang.Object anObj)
public static RMColor get(Color c)