|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jzy3d.colors.Color
public class Color
Color interface.
The Color interface provide a representation of a color, independant from the target Window Toolkit (AWT, SWT, etc).
Field Summary | |
---|---|
float |
a
|
float |
b
|
static Color |
BLACK
Black color. |
static Color |
BLUE
Blue color. |
static Color[] |
COLORS
|
static Color |
CYAN
Cyan color. |
float |
g
|
static Color |
GRAY
Gray color. |
static Color |
GREEN
Green color. |
static Color |
MAGENTA
Magenta color. |
float |
r
|
static Color |
RED
Red color. |
static Random |
rng
|
static Color |
WHITE
White color. |
static Color |
YELLOW
Yellow color. |
Constructor Summary | |
---|---|
Color(float r,
float g,
float b)
Initialize a color with an alpha channel set to 1. |
|
Color(float r,
float g,
float b,
float a)
Initialize a color with values between 0 and 1. |
|
Color(int r,
int g,
int b)
Initialize a color with an alpha channel set to 255. |
|
Color(int r,
int g,
int b,
int a)
Initialize a color with values between 0 and 255. |
Method Summary | |
---|---|
Color |
alphaSelf(float alpha)
|
Color |
clone()
|
static Color |
color(int c)
Returns one of the main color based on id. |
void |
mul(Color factor)
|
Color |
negative()
|
static Color |
random()
|
float[] |
toArray()
|
String |
toHex()
Return the hexadecimal representation of this color. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Color BLACK
public static final Color WHITE
public static final Color GRAY
public static final Color RED
public static final Color GREEN
public static final Color BLUE
public static final Color YELLOW
public static final Color MAGENTA
public static final Color CYAN
public static final Color[] COLORS
public static Random rng
public float r
public float g
public float b
public float a
Constructor Detail |
---|
public Color(float r, float g, float b)
public Color(int r, int g, int b)
public Color(float r, float g, float b, float a)
public Color(int r, int g, int b, int a)
Method Detail |
---|
public void mul(Color factor)
public Color alphaSelf(float alpha)
public String toHex()
public String toString()
toString
in class Object
public Color clone()
clone
in class Object
public float[] toArray()
public Color negative()
public static Color random()
public static Color color(int c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |