public class ColourUtils extends Object
| Constructor and Description |
|---|
ColourUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
colorToHex(Color color)
Returns hexadecimal value for a color.
|
static Color |
darken(Color color,
double amount)
Returns a color darker than the given color
|
static String |
darken(String hexColor,
double amount)
Returns a color darker than the given color
|
static Color |
desaturate(Color color,
double amount)
Returns a color less saturate than the given color
|
static String |
desaturate(String hexColor,
double amount)
Returns a color less saturate than the given color
|
static Color |
hexToColor(String hexColor)
Given a color hexadecimal value returns a Color object.
|
static int[] |
hslToRgb(float[] hsl)
Returns the color value in the RGB space
|
static Color |
lighten(Color color,
double amount)
Returns a color lighter than the given color
|
static String |
lighten(String hexColor,
double amount)
Returns a color lighter than the given color
|
static Color |
saturate(Color color,
double amount)
Returns a color more saturated than the given color
|
static String |
saturate(String hexColor,
double amount)
Returns a color more saturated than the given color
|
static float[] |
toHSL(Color color)
Returns the color value in the HSL space
|
public static final Double EPSILON
public static String colorToHex(Color color)
color - color objectpublic static Color hexToColor(String hexColor)
hexColor - color hexadecimal valuepublic static String darken(String hexColor, double amount)
hexColor - color hexadecimal valueamount - value between 0 and 100.public static String lighten(String hexColor, double amount)
hexColor - color hexadecimal valueamount - value between 0 and 100.public static String saturate(String hexColor, double amount)
hexColor - color hexadecimal valueamount - value between 0 and 100.public static String desaturate(String hexColor, double amount)
hexColor - color hexadecimal valueamount - value between 0 and 100.public static Color darken(Color color, double amount)
color - color onjectamount - value between 0 and 100.public static Color lighten(Color color, double amount)
color - color objectamount - value between 0 and 100.public static Color desaturate(Color color, double amount)
color - color objectamount - value between 0 and 100.public static Color saturate(Color color, double amount)
color - color objectamount - value between 0 and 100.public static float[] toHSL(Color color)
color - color objectpublic static int[] hslToRgb(float[] hsl)
hsl - color in hsl spaceCopyright © 2003–2022 Atlassian. All rights reserved.