Expand description
A simple crate that calculates color temperatures
It implements an algorithm by Tanner Helland that calculates RGB values for specific color temperatures. It can also do the inverse by aproxmiation.
This crate includes unit tests to ensure functionality
§Examples
Following are some simple examples of how to use this crate
extern crate colortemp;
let mut rgb = colortemp::temp_to_rgb(2000);
println!("{:?}", rgb);
The values generated by this crate can include uncertainty and might therefore not be suitable for scientific computing.
If you wish to change this, PR’s are always welcome 😁
Structs§
- RGB
- A simple container format to describe an RGB value
Functions§
- rgb_
to_ temp - Calculates the color temperature for a given RGB value
- temp_
to_ rgb