public final class LabColorSpace extends ColorSpace
Represents the CIE 1976 (L*, a*, b*) or "CIELAB" device-independent ColorSpace. Colors from
this ColorSpace can be used like any other color from the RGB or CMYK
ColorSpaces, although they are most useful when specifying alternates for Spot
colors.
Technically you also need to specify the CIE illuminant to completely define the color, but
usually the intention is to define an exact color for print output, so the D50 illuminant is
assumed. If you require a D65 illuminant the getColorD65(float, float, float)
method can be called.
For example, here are three ways to specify the Color "PANTONE® Reflex Blue C" - the first using L*a*b values in CIELAB space with a D50 illuminant, the second in the same space with a D65 illuminant, and the third using a CMYK process colorspace. Note that the third approach is an approximation only as this particular shade can not normally be reproduced using a four-color process, which is why using Lab colors as alternatives for Spot colors is the best option if possible.
Color blue = SpotColorSpace.getInstance("Pantone Reflex Blue C", LabColorSpace.getColor(19, 26, -68)); Color blue = SpotColorSpace.getInstance("Pantone Reflex Blue C", LabColorSpace.getColorD65(26.18, 18.64, -59.93)); Color blue = SpotColorSpace.getInstance("Pantone Reflex Blue C", CMYKColorSpace.getColor(1, 0.73f, 0, 0.02f));
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
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
float[] |
fromCIEXYZ(float[] xyz) |
float[] |
fromRGB(float[] rgb) |
static Color |
getColor(float L,
float a,
float b)
Get a Color in the standard CIELAB D50 ColorSpace, based on the D50 illuminant.
|
static Color |
getColorD65(float L,
float a,
float b)
Get a Color in the CIELAB ColorSpace, based on the D65 illuminant.
|
int |
hashCode() |
float[] |
toCIEXYZ(float[] lab) |
float[] |
toRGB(float[] lab) |
String |
toString() |
getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
public float[] toRGB(float[] lab)
toRGB
in class ColorSpace
public float[] fromRGB(float[] rgb)
fromRGB
in class ColorSpace
public float[] fromCIEXYZ(float[] xyz)
fromCIEXYZ
in class ColorSpace
public float[] toCIEXYZ(float[] lab)
toCIEXYZ
in class ColorSpace
public static Color getColor(float L, float a, float b)
SpotColorSpace
Spot color, for instance.L
- the "L" value, which will be clipped to the range 0..100a
- the "a" value, which will be clipped to the range -100..100b
- the "b" value, which will be clipped to the range -100..100public static Color getColorD65(float L, float a, float b)
L
- the "L" value, which will be clipped to the range 0..100a
- the "a" value, which will be clipped to the range -100..100b
- the "b" value, which will be clipped to the range -100..100Copyright © 2001-2017 Big Faceless Organization