lambda2color

This is a simple library to transform a given light wavelength into the corresponding RGB color.


Keywords
computational, neuroscience, simulation, analysis, visualization, biologically-inspired, computer, vision
License
GPL-2.0
Install
pip install lambda2color==0.7

Documentation

license Binder PyPI version

lambda2color: convert a given light wavelength into the corresponding RGB color

This is a simple library to transform a given light wavelength into the corresponding RGB color.

It is based on the different sensitivities to a novel color space called the CIE 193 " XYZ" color space and defined by the CIE colour matching function for 380 - 780 nm in 5 nm intervals :

CIE colour matching function

This allows to simply compute for instance the color of different monochromatic lights:

Rainbow

For more advanced uses, see for instance this blog post computing the color of the sky.