Learn R Programming

colorSpec (version 0.5-2)

computeCCT: Compute Correlated Color Temperature (CCT) of Light Spectra

Description

Compute the CCT in Kelvin degrees of a colorSpec object with type equal to 'light'

Usage

## S3 method for class 'colorSpec':
computeCCT( x )

CCTfromXYZ( XYZ )

Arguments

x
an colorSpec Robject with type equal to 'light', and M spectra
XYZ
a colorSpec 3-vector with XYZ tristimuls values

Value

  • computeCCT returns a numeric vector of length M, where M is the number of spectra in x. The vector's names is set to specnames(x). If the type of x is not 'light', then a warning is issued and all values are NA. CCTfromXYZ returns a single number, but if the chromaticity of XYZ is too far from the daylight locus, then it returns NA.

encoding

UTF-8

source

http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_T.html

Details

In computeCCT, for each spectrum, XYZ is computed using xyz1931.1nm, and the result passed to CCTfromXYZ. If the quantity of x is 'photons' (actinometric) each spectrum is converted to 'power' (radiometric) on the fly. In CCTfromXYZ, the CCT is computed using Robertson's Method, which can compute CCTs in the interval [1666.7K,Inf], see References.

References

Günther Wyszecki and W. S. Stiles. Color Science: Concepts and Methods, Quantitative Data and Formulae, Second Edition. John Wiley & Sons, 1982. Table 1(3.11). pp. 227-228.

See Also

type, quantity, xyz1931, specnames

Examples

Run this code
computeCCT( D65.1nm )       # returns 6502.068
computeCCT( A.1nm )         # returns 2855.656
CCTfromXYZ( c(1,1,1) )      # returns 5454.028

Run the code above in your browser using DataLab