public class BaseColor extends Object
Modifier and Type | Field and Description |
---|---|
static BaseColor |
BLACK |
static BaseColor |
BLUE |
static BaseColor |
CYAN |
static BaseColor |
DARK_GRAY |
static BaseColor |
GRAY |
static BaseColor |
GREEN |
static BaseColor |
LIGHT_GRAY |
static BaseColor |
MAGENTA |
static BaseColor |
ORANGE |
static BaseColor |
PINK |
static BaseColor |
RED |
static BaseColor |
WHITE |
static BaseColor |
YELLOW |
Constructor and Description |
---|
BaseColor(float red, float green, float blue)
Construct a BaseColor with float values.
|
BaseColor(float red, float green, float blue, float alpha)
Construct a BaseColor with float values.
|
BaseColor(int argb)
Construct a BaseColor by setting the combined value.
|
BaseColor(int red, int green, int blue) |
BaseColor(int red, int green, int blue, int alpha)
Construct a new BaseColor.
|
Modifier and Type | Method and Description |
---|---|
BaseColor |
brighter()
Make this BaseColor brighter.
|
BaseColor |
darker()
Make this color darker.
|
boolean |
equals(Object obj) |
int |
getAlpha() |
int |
getBlue() |
int |
getGreen() |
int |
getRed() |
int |
getRGB() |
int |
hashCode() |
protected void |
setValue(int red, int green, int blue, int alpha) |
String |
toString() |
public static final BaseColor WHITE
public static final BaseColor LIGHT_GRAY
public static final BaseColor GRAY
public static final BaseColor DARK_GRAY
public static final BaseColor BLACK
public static final BaseColor RED
public static final BaseColor PINK
public static final BaseColor ORANGE
public static final BaseColor YELLOW
public static final BaseColor GREEN
public static final BaseColor MAGENTA
public static final BaseColor CYAN
public static final BaseColor BLUE
public BaseColor(int red, int green, int blue, int alpha)
red
- the value for the red gamma
green
- the value for the green gamma
blue
- the value for the blue gamma
alpha
- the value for the alpha gamma
public BaseColor(int red, int green, int blue)
red
-
green
-
blue
-
public BaseColor(float red, float green, float blue, float alpha)
red
-
green
-
blue
-
alpha
-
public BaseColor(float red, float green, float blue)
red
-
green
-
blue
-
public BaseColor(int argb)
argb
-
public int getRGB()
public int getRed()
public int getGreen()
public int getBlue()
public int getAlpha()
public BaseColor brighter()
public BaseColor darker()
protected void setValue(int red, int green, int blue, int alpha)
Copyright © 1998–2024. All rights reserved.