visible: Correspondence table between wavelengths of visible light and...

visibleR Documentation

Correspondence table between wavelengths of visible light and sRGB colors

Description

Correspondence table between wavelengths of visible light and sRGB colors

Usage

visible

Format

A data.frame with 77 rows and 2 variables:

wl

the wavelength, in nm.

color

the hex code of the corresponding color.

Details

As explained by the author, David Eccles: "Colour ranges were taken from 'CRC Handbook of Fundamental Spectroscopic Correlation Charts' (see https://en.wikipedia.org/wiki/Visible_spectrum). Spectral XYZ locus coordinates were found at http://www.cie.co.at/main/freepubs.html. Every 10nm, the spectral locus point was used as the initial point in a search for a matching sRGB colour (assuming "Dim" viewing condition). The search was carried out by a binary search along a line in JCh space between the spectral point, and a point with 0.3 * brightness (J), 0 chroma (C), and the same hue (h) as the spectral point. The search finished when a point was found that was in sRGB space. The CAT02 matrix was modified as suggested in Brill(2008) https://doi.org/10.1002/col.20432 to reduce yellow-blue problems by replacing the bottom row (0.0030, 0.0136, 0.9834) with (0,0,1). An iterative smoothing was carried out to eliminate the largest jumps in chroma (greater than 5% change). Code used to generate the colour gradient can be found at http://www.gringene.org/code/spectrum.r."

Source

https://en.wikipedia.org/wiki/Visible_spectrum#/media/File:Linear_visible_spectrum.svg

See Also

wavelength which uses the table to convert any wavelength value to an R color.


jiho/chroma documentation built on Nov. 26, 2022, 2:39 a.m.