|
||||||||||
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 java.lang.Double |
EPSILON
|
Constructor Summary | |
---|---|
ColourUtils()
|
Method Summary | |
---|---|
static java.lang.String |
colorToHex(java.awt.Color color)
Returns hexadecimal value for a color. |
static java.awt.Color |
darken(java.awt.Color color,
double amount)
Returns a color darker than the given color |
static java.lang.String |
darken(java.lang.String hexColor,
double amount)
Returns a color darker than the given color |
static java.awt.Color |
desaturate(java.awt.Color color,
double amount)
Returns a color less saturate than the given color |
static java.lang.String |
desaturate(java.lang.String hexColor,
double amount)
Returns a color less saturate than the given color |
static java.awt.Color |
hexToColor(java.lang.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 java.awt.Color |
lighten(java.awt.Color color,
double amount)
Returns a color lighter than the given color |
static java.lang.String |
lighten(java.lang.String hexColor,
double amount)
Returns a color lighter than the given color |
static java.awt.Color |
saturate(java.awt.Color color,
double amount)
Returns a color more saturated than the given color |
static java.lang.String |
saturate(java.lang.String hexColor,
double amount)
Returns a color more saturated than the given color |
static float[] |
toHSL(java.awt.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 java.lang.Double EPSILON
Constructor Detail |
---|
public ColourUtils()
Method Detail |
---|
public static java.lang.String colorToHex(java.awt.Color color)
color
- color object
public static java.awt.Color hexToColor(java.lang.String hexColor)
hexColor
- color hexadecimal value
public static java.lang.String darken(java.lang.String hexColor, double amount)
hexColor
- color hexadecimal valueamount
- value between 0 and 100.
public static java.lang.String lighten(java.lang.String hexColor, double amount)
hexColor
- color hexadecimal valueamount
- value between 0 and 100.
public static java.lang.String saturate(java.lang.String hexColor, double amount)
hexColor
- color hexadecimal valueamount
- value between 0 and 100.
public static java.lang.String desaturate(java.lang.String hexColor, double amount)
hexColor
- color hexadecimal valueamount
- value between 0 and 100.
public static java.awt.Color darken(java.awt.Color color, double amount)
color
- color onjectamount
- value between 0 and 100.
public static java.awt.Color lighten(java.awt.Color color, double amount)
color
- color objectamount
- value between 0 and 100.
public static java.awt.Color desaturate(java.awt.Color color, double amount)
color
- color objectamount
- value between 0 and 100.
public static java.awt.Color saturate(java.awt.Color color, double amount)
color
- color objectamount
- value between 0 and 100.
public static float[] toHSL(java.awt.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 |