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.6.tar.gz
.
File metadata
- Download URL: lambda2color-0.6.tar.gz
- Upload date:
- Size: 277.8 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 | 5bf7214dd747aa59bc262d75f2c91a91f293968041d445b1657b969004f0c946 |
|
MD5 | 80521b7db2b713bd4f2d0c0c4f78ea9f |
|
BLAKE2b-256 | 31ef134fe3fd44ef049102982eda82e45eb86e81b45d8cf6bb5e68448dde1cd8 |