Controls Color for CSS styles and has methods for brighter, darker, etc.
Type Params | Return Type | Name and description |
---|---|---|
|
Color |
alpha(double alpha) Returns a copy of this color but with given 0-1 alpha value. |
|
Color |
brighter() A new color with brighter lumosity. |
|
Color |
darker() A new color with darker lumosity. |
|
Color |
desaturate(float percent) |
|
double |
getAlpha() Alpha of this color as a number between 0 and 1, inclusive. |
|
int |
getBlue() Blue channel 0-255. |
|
float |
getBrightness() |
|
int |
getGreen() Green channel 0-255. |
|
int |
getHue() Gets Hue component of color as a number 0-360. |
|
int |
getRed() Red channel 0-255. |
|
float |
getSaturation() |
|
Color |
mix(Color color2, double w = 0.5) Returns a copy of this color mixed with other Color with optional 0-1 weight value. |
|
Color |
saturate(float percent) |
|
void |
setColor(String colorStr) |
|
String |
toHex() |
|
String |
toString() |
Returns a copy of this color but with given 0-1 alpha value.
A new color with brighter lumosity.
A new color with darker lumosity.
Alpha of this color as a number between 0 and 1, inclusive.
Blue channel 0-255.
Green channel 0-255.
Gets Hue component of color as a number 0-360.
Red channel 0-255.
Returns a copy of this color mixed with other Color with optional 0-1 weight value.
Groovy Documentation