1 unstable release
Uses old Rust 2015
0.1.0 | Dec 6, 2017 |
---|
#81 in #temperature
5KB
94 lines
colortemp.rs
Simple functions to calculate color temperatures and RGB values.
extern crate colortemp;
let mut rgb = colortemp::temp_to_rgb(2000);
println!("{:?}", rgb);
lib.rs
:
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 😁