|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--waba.fx.Color
Color represents a color.
A color is defined as a mixture of red, green and blue color values. Each value is in the range of 0 to 255 where 0 is darkest and 255 is brightest. For example, Color(255, 0, 0) is the color red.
Here are some more examples:
Field Summary | |
static Color |
BLACK
|
protected int |
blue
|
protected Color |
bright
|
static Color |
BRIGHT
|
protected Color |
dark
|
static Color |
DARK
|
static Color |
defaultBackColor
|
static Color |
defaultForeColor
|
int |
equ
for fast comparisions. 2 colors are equal if their equ have the same value |
static int |
fadeStep
|
protected int |
gray
|
protected int |
green
|
protected int |
red
|
protected int |
rgb
|
static int |
smallerFadeStep
|
static Color |
WHITE
|
Constructor Summary | |
Color(int rgb)
Constructs a color object with the given rgb |
|
Color(int red,
int green,
int blue)
Constructs a color object with the given red, green and blue values. |
|
Color(String rrggbb)
Constructs a color object with the given rgb |
Method Summary | |
Color |
brighter()
return a color that is brighter than the current one. if grayscale, returns the following brighter color |
Color |
brighter(int step)
return a color that is brighter than the current one. if grayscale, returns the following brighter color |
Color |
darker()
return a color that is darker than the current one. if grayscale, returns the following darker color |
Color |
darker(int step)
return a color that is darker than the current one. if grayscale, returns the following darker color |
boolean |
equals(Object obj)
Returns true if this color equals to the other color. if in grayScale mode, returns true if both grayValues are equal. |
int |
getAlpha()
Returns the alpha channel of this Color in a value from 0 to 255 |
int |
getBlue()
Returns the blue value of the color. |
Color |
getCursorColor()
Returns the best cursor color depending on the color |
int |
getGray()
Returns this index of the color in gray scale mode. |
int |
getGreen()
Returns the green value of the color. |
int |
getRed()
Returns the red value of the color. |
int |
getRGB()
Returns the current color as 0x00RRGGBB |
int |
hashCode()
returns the best hash code for this color (equ) |
String |
toString()
Returns the string representation of this color: the rgb in hexadecimal |
Methods inherited from class java.lang.Object |
getClass,
notify,
wait,
wait |
Field Detail |
protected int red
protected int green
protected int blue
protected int rgb
protected int gray
public int equ
protected Color bright
protected Color dark
public static int fadeStep
public static int smallerFadeStep
public static final Color WHITE
public static final Color BRIGHT
public static final Color DARK
public static final Color BLACK
public static Color defaultForeColor
public static Color defaultBackColor
Constructor Detail |
public Color(int red, int green, int blue)
red
- the red value in the range of 0 to 255green
- the green value in the range of 0 to 255blue
- the blue value in the range of 0 to 255public Color(int rgb)
rgb
- a color in the format 0x00RRGGBBpublic Color(String rrggbb)
rgb
- a string in the format RRGGBB (colors in hex).Method Detail |
public int getAlpha()
public int getBlue()
public int getGreen()
public int getRed()
public int getGray()
public int getRGB()
public int hashCode()
public boolean equals(Object obj)
public Color brighter()
public Color darker()
public Color brighter(int step)
public Color darker(int step)
public String toString()
public Color getCursorColor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |