|
JIDE Common Layer 2.7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jidesoft.utils.ColorUtils
public class ColorUtils
Several useful methods for Color.
Constructor Summary | |
---|---|
ColorUtils()
|
Method Summary | |
---|---|
static float[] |
applyDifference(float[] from,
int[] diff)
|
static int[] |
calculateDifferent(float[] from,
float[] to)
|
static java.awt.Color |
getDerivedColor(java.awt.Color color,
float ratio)
Gets a derived color from an existing color. |
static int |
HSLtoRGB(float[] hsl)
Converts from HSL color space to RGB color. |
static float[] |
RGBtoHSL(java.awt.Color colorRGB)
Converts a color from RBG to HSL color space. |
static java.awt.Color[] |
toColors(boolean hasalpha,
int... colors)
Simply calls new Color(color, hasalpha) for each color in colors and returns all of them. |
static java.awt.Color |
toGrayscale(java.awt.Color c)
Converts from a color to gray scale color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorUtils()
Method Detail |
---|
public static java.awt.Color getDerivedColor(java.awt.Color color, float ratio)
color
- the given color.ratio
- the ratio.
public static float[] RGBtoHSL(java.awt.Color colorRGB)
colorRGB
-
public static int HSLtoRGB(float[] hsl)
hsl
-
public static int[] calculateDifferent(float[] from, float[] to)
public static float[] applyDifference(float[] from, int[] diff)
public static java.awt.Color[] toColors(boolean hasalpha, int... colors)
hasalpha
- colors
-
public static java.awt.Color toGrayscale(java.awt.Color c)
c
- a color.
|
JIDE Common Layer 2.7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |