|
xmlgraphics-commons 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.color.ColorSpace
org.apache.xmlgraphics.java2d.color.CIELabColorSpace
public class CIELabColorSpace
This class defines the CIE L*a*b* (CIE 1976) color space. Valid values for L* are between 0 and 100, for a* and b* between -127 and +127.
Field Summary |
---|
Fields inherited from class java.awt.color.ColorSpace |
---|
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy |
Constructor Summary | |
---|---|
CIELabColorSpace()
Default constructor using the D65 white point. |
|
CIELabColorSpace(float[] whitePoint)
CIE Lab space constructor which allows to give an arbitrary white point. |
Method Summary | |
---|---|
float[] |
fromCIEXYZ(float[] colorvalue)
|
float[] |
fromRGB(float[] rgbvalue)
|
static float[] |
getD50WhitePoint()
Returns the D50 white point. |
static float[] |
getD65WhitePoint()
Returns the D65 white point. |
float |
getMaxValue(int component)
|
float |
getMinValue(int component)
|
String |
getName(int component)
|
float[] |
getWhitePoint()
Returns the configured white point. |
float[] |
toCIEXYZ(float[] colorvalue)
|
float[] |
toCIEXYZNative(float l,
float a,
float b)
Transforms a color value assumed to be in this ColorSpace
into the CS_CIEXYZ conversion color space. |
Color |
toColor(float[] colorvalue,
float alpha)
Creates a Color instance from color values usually used by the L*a*b* color space
by scaling them to the 0.0..1.0 range expected by Color's constructor. |
Color |
toColor(float l,
float a,
float b,
float alpha)
Creates a Color instance from color values usually used by the L*a*b* color space
by scaling them to the 0.0..1.0 range expected by Color's constructor. |
float[] |
toNativeComponents(float[] comps)
Converts normalized (0..1) color components to CIE L*a*b*'s native value range. |
float[] |
toRGB(float[] colorvalue)
|
Methods inherited from class java.awt.color.ColorSpace |
---|
getInstance, getNumComponents, getType, isCS_sRGB |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CIELabColorSpace()
public CIELabColorSpace(float[] whitePoint)
whitePoint
- the white point in XYZ coordinates (valid values: 0.0f to 1.0f, although
values slightly larger than 1.0f are common)Method Detail |
---|
public static float[] getD65WhitePoint()
public static float[] getD50WhitePoint()
public float[] getWhitePoint()
public float getMinValue(int component)
getMinValue
in class ColorSpace
public float getMaxValue(int component)
getMaxValue
in class ColorSpace
public String getName(int component)
getName
in class ColorSpace
public float[] fromCIEXYZ(float[] colorvalue)
fromCIEXYZ
in class ColorSpace
public float[] fromRGB(float[] rgbvalue)
fromRGB
in class ColorSpace
public float[] toCIEXYZ(float[] colorvalue)
toCIEXYZ
in class ColorSpace
public float[] toCIEXYZNative(float l, float a, float b)
ColorSpace
into the CS_CIEXYZ conversion color space. This method uses component values
in CIE Lab's native color ranges rather than the normalized values between 0 and 1.
l
- the L* component (values between 0 and 100)a
- the a* component (usually between -128 and +128)b
- the b* component (usually between -128 and +128)
toCIEXYZ(float[])
public float[] toRGB(float[] colorvalue)
toRGB
in class ColorSpace
public float[] toNativeComponents(float[] comps)
comps
- the normalized components.
public Color toColor(float[] colorvalue, float alpha)
Color
instance from color values usually used by the L*a*b* color space
by scaling them to the 0.0..1.0 range expected by Color's constructor.
colorvalue
- the original color values
(native value range, i.e. not normalized to 0.0..1.0)alpha
- the alpha component
public Color toColor(float l, float a, float b, float alpha)
Color
instance from color values usually used by the L*a*b* color space
by scaling them to the 0.0..1.0 range expected by Color's constructor.
l
- the L* component (values between 0 and 100)a
- the a* component (usually between -128 and +127)b
- the b* component (usually between -128 and +127)alpha
- the alpha component (values between 0 and 1)
|
xmlgraphics-commons 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |