|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gicentre.utils.colour.CIELab
public class CIELab
Utilities for handling the CIELab colour space. This space is approximately perceptually
uniform in that two colours a fixed distance apart in the colour space should be equally
distinguishable from each other regardless of their location.
For details see
en.wikipedia.org/wiki/Lab_color_space.
Constructor Summary | |
---|---|
CIELab()
Creates a CIELab converter using the default D65 illuminant with 2 degree observer position. |
|
CIELab(ColourConverter.WhitePoint wp)
Creates a CIELab converter using the given reference calibration settings. |
Method Summary | |
---|---|
java.awt.Color |
getColour(double L,
double a,
double b,
boolean useNearest)
Finds the colour corresponding to the given CIELab triplet. |
processing.core.PVector |
getLab(java.awt.Color colour)
Finds the CIELab triplet representing the given colour. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CIELab()
public CIELab(ColourConverter.WhitePoint wp)
wp
- Colour calibration reference to use in the CIELab conversion.Method Detail |
---|
public processing.core.PVector getLab(java.awt.Color colour)
colour
- Colour to convert.
public java.awt.Color getColour(double L, double a, double b, boolean useNearest)
useNearest
is false, otherwise the approximate nearest
visible colour will be returned. CIELab L values should be scaled between 0-100,
and a and b values scaled between -100 and 100. Based on the conversion code by Duane
Schwartzwald, 12th March, 2006 and Harry Parker, Feb 27th, 2007.
See
rsbweb.nih.gov/ij/plugins/download/Color_Space_Converter.java.
L
- CIELab L value scaled between 0 and 100.a
- CIELab a value scaled between -100 and 100.b
- CIELab b value scaled between -100 and 100.useNearest
- If true, out-of-gamut colours will be converted to their nearest visible
equivalent. If not, out-of-gamut colours returned as null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |