|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jzy3d.colors.Color
public class Color
Color
provides a representation of a color.
The color representation relies on a set of float components
with values in the range [0;1]. When using the integer constructor
of Color
, values are expected to stand in [0;255] and are
scaled to be maintained in [0;1] afterward.
Beside being a convenient container, Color
also:
negative()
toArray()
toHex()
awt()
, and be built with a constructor supporting an AWT color.
random()
colors.
Field Summary | |
---|---|
float |
a
|
float |
b
|
static Color |
BLACK
|
static Color |
BLUE
|
static Color |
CYAN
|
float |
g
|
static Color |
GRAY
|
static Color |
GREEN
|
static Color |
MAGENTA
|
float |
r
|
static Color |
RED
|
static Color |
WHITE
|
static Color |
YELLOW
|
Constructor Summary | |
---|---|
Color(java.awt.Color c)
|
|
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)
|
java.awt.Color |
awt()
|
Color |
clone()
|
void |
mul(Color factor)
|
Color |
negative()
|
static Color |
random()
|
float[] |
toArray()
|
java.lang.String |
toHex()
Return the hexadecimal representation of this color. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, 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 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)
public Color(java.awt.Color c)
Method Detail |
---|
public void mul(Color factor)
public Color alphaSelf(float alpha)
public java.lang.String toHex()
public java.lang.String toString()
toString
in class java.lang.Object
public Color clone()
clone
in class java.lang.Object
public float[] toArray()
public Color negative()
public static Color random()
public java.awt.Color awt()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |