|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.ColourUtils
public class ColourUtils
Color manipulation utilities
Field Summary | |
---|---|
static Double |
EPSILON
|
Constructor Summary | |
---|---|
ColourUtils()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Double EPSILON
Constructor Detail |
---|
public ColourUtils()
Method Detail |
---|
public static String colorToHex(Color color)
color
- color object
public static Color hexToColor(String hexColor)
hexColor
- color hexadecimal value
public 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 object
public static int[] hslToRgb(float[] hsl)
hsl
- color in hsl space
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |