This is a simple library to transform a given light wavelength into the corresponding RGB color.
Project description
![license](https://img.shields.io/badge/license-MIT-blue) [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/laurentperrinet/lambda2color/main) [![PyPI version](https://badge.fury.io/py/lambda2color.svg)](https://badge.fury.io/py/lambda2color)
# 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](https://en.wikipedia.org/wiki/CIE_1931_color_space) and defined by the CIE colour matching function for 380 - 780 nm in 5 nm intervals :
![CIE colour matching function](cmf.png)
This allows to simply compute for instance the color of different monochromatic lights:
![Rainbow](spectrum.png)
For more advanced uses, see for instance this blog post computing [the color of the sky](https://laurentperrinet.github.io/sciblog/posts/2020-07-04-colors-of-the-sky.html).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file lambda2color-0.7.tar.gz
.
File metadata
- Download URL: lambda2color-0.7.tar.gz
- Upload date:
- Size: 277.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cb8a1f8d95e8b56f55309e89bc5837a4f29c6317ffafd7b577d9c996aaec1f5 |
|
MD5 | 03d099d905a77d3f1a9a2b9894b6ae9a |
|
BLAKE2b-256 | 5f13f46eff194cdb15324cb6a4e89f63607e069e82a76de38447ce79927327e4 |