public final class Color extends Object
Modifier and Type | Field and Description |
---|---|
static Color |
BISMARK
The color bismark ■.
|
static Color |
BLACK
The color black ■.
|
static Color |
BLUE
The color blue ■.
|
static Color |
BROWN
The color brown ■.
|
static Color |
CINNABAR
The color cinnabar ■.
|
static Color |
CYAN
The color cyan ■.
|
static Color |
DARK_GOLDENROD
The color dark goldenrod ■.
|
static Color |
DARK_GRAY
The color dark gray ■.
|
static Color |
DEEP_LILAC
The color deep lilac ■.
|
static Color |
DEEP_SEA
The color deep sea ■.
|
static Color |
ENDEAVOUR
The color endeavour ■.
|
static Color |
GRAY
The color gray ■.
|
static Color |
GRAY_CHATEAU
The color gray chateau ■.
|
static Color |
GREEN
The color green ■.
|
static Color |
HOKI
The color hoki ■.
|
static Color |
JAZZBERRY_JAM
The color jazzberry jam ■.
|
static Color |
LIGHT_GRAY
The color light gray ■.
|
static Color |
LIGHT_SEA_GREEN
The color light sea green ■.
|
static Color |
MAGENTA
The color magenta ■.
|
static Color |
MEDIUM_SEA_GREEN
The color medium sea green ■.
|
static Color |
MOON_YELLOW
The color moon yellow ■.
|
static Color |
ORANGE
The color orange ■.
|
static Color |
PINK
The color pink ■.
|
static Color |
RED
The color red ■.
|
static Color |
RUBY
The color ruby ■.
|
static Color |
RUST
The color rust ■.
|
static Color |
SEA_GREEN
The color sea green ■.
|
static Color |
SUBMARINE
The color submarine ■.
|
static Color |
SUMMER_SKY
The color summer sky ■.
|
static Color |
TAHITI_GOLD
The color tahiti gold ■.
|
static Color |
VIVID_VIOLET
The color vivid violet ■.
|
static Color |
WHITE
The color white ■.
|
static Color |
YELLOW
The color yellow ■.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getBlue()
Returns the blue value for this color, as an integer in the range 0-255.
|
int |
getGreen()
Returns the green value for this color, as an integer in the range 0-255.
|
int |
getRed()
Returns the red value for this color, as an integer in the range 0-255.
|
int |
getRGB()
Returns the RGB value for this color.
|
int |
hashCode() |
static Color |
of(float red,
float green,
float blue)
Initializes a new instance of
Color using the specified red, green, and blue values, which must be given
as floats in the range of 0.0F-1.0F. |
static Color |
of(int rgb)
Initializes a new instance of
Color using the specified RGB value. |
static Color |
of(int red,
int green,
int blue)
Initializes a new instance of
Color using the specified red, green, and blue values, which must be given
as integers in the range of 0-255. |
String |
toString() |
public static final Color WHITE
public static final Color LIGHT_GRAY
public static final Color GRAY
public static final Color DARK_GRAY
public static final Color BLACK
public static final Color RED
public static final Color PINK
public static final Color ORANGE
public static final Color YELLOW
public static final Color GREEN
public static final Color MAGENTA
public static final Color CYAN
public static final Color BLUE
public static final Color LIGHT_SEA_GREEN
public static final Color MEDIUM_SEA_GREEN
public static final Color SUMMER_SKY
public static final Color DEEP_LILAC
public static final Color RUBY
public static final Color MOON_YELLOW
public static final Color TAHITI_GOLD
public static final Color CINNABAR
public static final Color SUBMARINE
public static final Color HOKI
public static final Color DEEP_SEA
public static final Color SEA_GREEN
public static final Color ENDEAVOUR
public static final Color VIVID_VIOLET
public static final Color JAZZBERRY_JAM
public static final Color DARK_GOLDENROD
public static final Color RUST
public static final Color BROWN
public static final Color GRAY_CHATEAU
public static final Color BISMARK
public static Color of(float red, float green, float blue)
Color
using the specified red, green, and blue values, which must be given
as floats in the range of 0.0F-1.0F.red
- The red component of the RGB value.green
- The green component of the RGB value.blue
- The blue component of the RGB value.public static Color of(int red, int green, int blue)
Color
using the specified red, green, and blue values, which must be given
as integers in the range of 0-255.red
- The red component of the RGB value.green
- The green component of the RGB value.blue
- The blue component of the RGB value.public static Color of(int rgb)
Color
using the specified RGB value. The blue value is in bits 0-7, green
in bits 8-15, and red in bits 16-23.rgb
- The RGB value.public int getRGB()
public int getRed()
public int getGreen()
public int getBlue()