Example Code

Wavelength to Color using RGB approximations

Code and Documents

Attachment

This VI inputs a value for visible light wavelength and outputs a value for its equivalent color in LabVIEW. The color is calculated using straight-line RGB approximations for the visible light spectrum. You can use this VI to conveniently display a continuous spectrum of light or to give a visual approximation of light that a sensor is receiving.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors