public class ColorUtil
extends java.lang.Object
Color
and ColorSpace
objects.Modifier and Type | Method and Description |
---|---|
static float[] |
CIEXYZtoRGB(float[] xyz,
float[] rgb)
Faster CIEXYZtoRGB method which uses the provided output array.
|
static float[] |
CSfromCIEXYZ(java.awt.color.ColorSpace cs,
float[] xyz,
float[] colorvalue)
Faster fromCIEXYZ method which uses the provided output array.
|
static void |
CSfromCIEXYZ(NamedColorSpace cs,
float[] xyz,
float[] colorvalue)
Faster fromCIEXYZ method which uses the provided output array.
|
static float[] |
CSfromRGB(java.awt.color.ColorSpace cs,
float[] rgb,
float[] colorvalue)
Faster fromRGB method which uses the provided output array.
|
static void |
CSfromRGB(NamedColorSpace cs,
float[] rgb,
float[] colorvalue)
Faster fromRGB method which uses the provided output array.
|
static float[] |
CStoCIEXYZ(java.awt.color.ColorSpace cs,
float[] colorvalue,
float[] xyz)
Faster toCIEXYZ method which uses the provided output array.
|
static void |
CStoCIEXYZ(NamedColorSpace cs,
float[] colorvalue,
float[] xyz)
Faster toCIEXYZ method which uses the provided output array.
|
static void |
CStoRGB(java.awt.color.ColorSpace cs,
float[] colorvalue,
float[] rgb)
Faster toRGB method which uses the provided output array.
|
static float[] |
CStoRGB(NamedColorSpace cs,
float[] colorvalue,
float[] rgb)
Faster toRGB method which uses the provided output array.
|
static int |
CStoRGB24(java.awt.color.ColorSpace colorSpace,
float[] components,
float[] rgb) |
static float[] |
fromColor(java.awt.color.ColorSpace colorSpace,
java.awt.Color c)
Returns the color components in the specified color space from a
Color object. |
static float[] |
fromRGB(java.awt.color.ColorSpace colorSpace,
int rgb)
Returns the color components in the specified color space from an rgb
value.
|
static float[] |
fromRGB(java.awt.color.ColorSpace colorSpace,
int r,
int g,
int b)
Returns the color components in the specified color space from RGB
values.
|
static java.lang.String |
getName(java.awt.color.ColorSpace a)
Returns the name of the color space.
|
static boolean |
isEqual(java.awt.color.ColorSpace a,
java.awt.color.ColorSpace b)
Returns true, if the two color spaces are equal.
|
static float[] |
RGBtoCIEXYZ(float[] rgb,
float[] xyz)
Faster RGBtoCIEXYZ method which uses the provided output array.
|
static java.awt.Color |
shadow(java.awt.Color c,
int amount)
Blackens the specified color by casting a black shadow of the specified
amount on the color.
|
static java.awt.Color |
toColor(java.awt.color.ColorSpace colorSpace,
float... components)
Returns a color object from color components in the specified color
space.
|
static int |
toRGB24(java.awt.color.ColorSpace colorSpace,
float... components)
Returns an rgb value from color components in the specified color space.
|
static java.lang.String |
toToolTipText(java.awt.Color c)
Returns a tool tip text for the specified color with information in the
color space of the color.
|
public static float[] fromColor(java.awt.color.ColorSpace colorSpace, java.awt.Color c)
Color
object.public static java.awt.Color toColor(java.awt.color.ColorSpace colorSpace, float... components)
public static float[] fromRGB(java.awt.color.ColorSpace colorSpace, int rgb)
public static float[] fromRGB(java.awt.color.ColorSpace colorSpace, int r, int g, int b)
public static int toRGB24(java.awt.color.ColorSpace colorSpace, float... components)
public static int CStoRGB24(java.awt.color.ColorSpace colorSpace, float[] components, float[] rgb)
public static java.lang.String toToolTipText(java.awt.Color c)
public static boolean isEqual(java.awt.color.ColorSpace a, java.awt.color.ColorSpace b)
public static java.lang.String getName(java.awt.color.ColorSpace a)
ICC_ColorSpace
the name is retrieved from the "desc" data element
of the color profile.a
- A ColorSpace.public static java.awt.Color shadow(java.awt.Color c, int amount)
public static void CStoRGB(java.awt.color.ColorSpace cs, float[] colorvalue, float[] rgb)
public static float[] CSfromRGB(java.awt.color.ColorSpace cs, float[] rgb, float[] colorvalue)
public static float[] CStoCIEXYZ(java.awt.color.ColorSpace cs, float[] colorvalue, float[] xyz)
public static float[] CSfromCIEXYZ(java.awt.color.ColorSpace cs, float[] xyz, float[] colorvalue)
public static float[] CStoRGB(NamedColorSpace cs, float[] colorvalue, float[] rgb)
public static float[] CIEXYZtoRGB(float[] xyz, float[] rgb)
public static float[] RGBtoCIEXYZ(float[] rgb, float[] xyz)
public static void CSfromRGB(NamedColorSpace cs, float[] rgb, float[] colorvalue)
public static void CStoCIEXYZ(NamedColorSpace cs, float[] colorvalue, float[] xyz)
public static void CSfromCIEXYZ(NamedColorSpace cs, float[] xyz, float[] colorvalue)