public class CorrelatedColorTemperature extends ColorSpaceDescriptor
In other words, for a given color (probably from a lamp), this will compute the temperature of a black body that most closely matches that color.
The algorithm for deriving the CCT was originally published by Gunter Wyszecki and W.S. Stiles in "Color Science: Concepts and Methods, Quantitative Data and Formulae", 2nd edition, 1982 (Wiley Classics), ISBN 0-471-39918-3, pp. 224-229, and was based on Alan Robertson's method, which was published in J. Opt. Soc. America, vol 58, pp 1528-1535, 1986. The code is based on a Usenet post by Neil Okamoto in sci.engr.color on 14 Jul 2001, but the values for the lookup table are recomputed based on a fresh blackbody color calculation with much finer resolution.
Constructor and Description |
---|
CorrelatedColorTemperature(CIEColor color)
Creates a new instance of CorrelatedColorTemperature.
|
Modifier and Type | Method and Description |
---|---|
static double |
computeCorrelatedColorTemperature(CIEColor color)
Computes the correlated color temperature, in kelvins, for the given
color.
|
static java.awt.geom.Point2D[] |
generatePlanckianLocus() |
static ColorSpaceValue[] |
getColorSpaceValues()
Returns an array of ColorSpaceValue objects, each of which can be
displayed in a widget (e.g.
|
double |
getCorrelatedColorTemperature()
Returns the correlated color temperature of an instantiated object
|
getAllColorSpaceDescriptors
public CorrelatedColorTemperature(CIEColor color) throws ColorConversionException
color
- the sample color which to compute the correlated color
temperature in kelvins.ColorConversionException
- if a problem occurs while attempting to convert from one color space to
another.public double getCorrelatedColorTemperature()
public static double computeCorrelatedColorTemperature(CIEColor color) throws ColorConversionException
color
- the sample color which to compute the correlated color
temperature in kelvins.ColorConversionException
- if a problem occurs while attempting to convert from one color space to
another.public static ColorSpaceValue[] getColorSpaceValues()
NOTE: do not change the name of this method without checking thoroughly for references to it. Other code will need to find this method by name at run-time given only a Class, so simple refactoring won't catch all references.
public static java.awt.geom.Point2D[] generatePlanckianLocus()
Copyright 2004-2006 Ocean Optics, Inc. All Rights Reserved.