public class CIELCHabColorSpace extends java.awt.color.ColorSpace implements NamedColorSpace
The L* coordinate of an object is the lightness intensity as measured on a scale from 0 to 100, where 0 represents black and 100 represents white.
The C and H coordinates are projections of the a* and b* colors of the CIE L*a*b* color space into polar coordinates.
a = C * cos(H) b = C * sin(H)
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 and Description |
---|
CIELCHabColorSpace() |
Modifier and Type | Method and Description |
---|---|
float[] |
fromCIEXYZ(float[] colorvalue)
XYT to Lab.
|
float[] |
fromRGB(float[] rgbvalue) |
float |
getMaxValue(int component) |
float |
getMinValue(int component) |
java.lang.String |
getName() |
java.lang.String |
getName(int component) |
boolean |
isClampRGBValues() |
static void |
main(java.lang.String[] arg) |
void |
setClampRGBValues(boolean b) |
float[] |
toCIEXYZ(float[] colorvalue)
Lab to XYZ.
|
float[] |
toRGB(float[] colorvalue) |
public float[] toRGB(float[] colorvalue)
toRGB
in class java.awt.color.ColorSpace
public float[] fromRGB(float[] rgbvalue)
fromRGB
in class java.awt.color.ColorSpace
public float[] toCIEXYZ(float[] colorvalue)
X = xr*Xr; Y = yr*Yr; Z = zr*Zr;where
xr = fx^3, if fx^3 > eps = (116*fx - 16)/k, if fx^3 <= eps yr = ((L+16)/116)^3, if L > k*eps = L/k, if L <= k*eps zr = fz^3, if fz^3 > eps = (116*fz - 16)/k, if fz^3 <= eps fx = a/500+fy fz = fy - b / 200 fy = (L+16)/116 eps = 216/24389 k = 24389/27Source: http://www.brucelindbloom.com/index.html?Equations.html
toCIEXYZ
in class java.awt.color.ColorSpace
colorvalue
- Lab color value.public float[] fromCIEXYZ(float[] colorvalue)
L = 116*fy - 16 a = 500 * (fx - fy) b = 200 * (fy - fz)where
fx = xr^(1/3), if xr > eps = (k*xr + 16) / 116 if xr <= eps fy = yr^(1/3), if yr > eps = (k*yr + 16) / 116 if yr <= eps fz = zr^(1/3), if zr > eps = (k*zr + 16) / 116 if zr <= eps xr = X / Xr yr = Y / Yr zr = Z / Zr eps = 216/24389 k = 24389/27Source: http://www.brucelindbloom.com/index.html?Equations.html
fromCIEXYZ
in class java.awt.color.ColorSpace
colorvalue
- CIEXYZ color value.public java.lang.String getName()
getName
in interface NamedColorSpace
public float getMinValue(int component)
getMinValue
in class java.awt.color.ColorSpace
public float getMaxValue(int component)
getMaxValue
in class java.awt.color.ColorSpace
public java.lang.String getName(int component)
getName
in class java.awt.color.ColorSpace
public void setClampRGBValues(boolean b)
public boolean isClampRGBValues()
public static void main(java.lang.String[] arg)