| Modifier and Type | Field and Description |
|---|---|
static FSRGBColor |
BLACK |
static FSRGBColor |
BLUE |
static FSRGBColor |
GREEN |
static FSRGBColor |
RED |
static FSRGBColor |
TRANSPARENT |
| Constructor and Description |
|---|
FSRGBColor(int color) |
FSRGBColor(int red,
int green,
int blue) |
FSRGBColor(int red,
int green,
int blue,
float alpha) |
| Modifier and Type | Method and Description |
|---|---|
FSColor |
darkenColor() |
boolean |
equals(Object o) |
static FSRGBColor |
fromHSL(float hue,
float saturation,
float lightness)
Create FSRGBColor from HSL (hue, saturation, lightness) values.
|
float |
getAlpha()
The alpha value of this color in the range 0 (fully transparent)
to 1 (fully opaque).
|
int |
getBlue() |
int |
getGreen() |
int |
getRed() |
boolean |
hasAlpha()
Whether this color has an alpha value other than fully opaque.
|
int |
hashCode() |
FSColor |
lightenColor() |
String |
toString() |
FSRGBColor |
withAlpha(float alpha)
Returns a copy of this color with the given alpha value (0..1).
|
public static final FSRGBColor TRANSPARENT
public static final FSRGBColor RED
public static final FSRGBColor GREEN
public static final FSRGBColor BLUE
public static final FSRGBColor BLACK
public FSRGBColor(int red,
int green,
int blue)
public FSRGBColor(int red,
int green,
int blue,
float alpha)
public FSRGBColor(int color)
public static FSRGBColor fromHSL(float hue, float saturation, float lightness)
hue - hue angle in degrees, normalized to the range [0,360) as
defined in CSS Color Module Level 3saturation - saturation (0..1)lightness - lightness (0..1)public FSRGBColor withAlpha(float alpha)
public int getBlue()
public int getGreen()
public int getRed()
public float getAlpha()
public boolean hasAlpha()
public FSColor lightenColor()
lightenColor in interface FSColorpublic FSColor darkenColor()
darkenColor in interface FSColorCopyright © 2004–2026. All rights reserved.