Skip to content

m-lima/tempergb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tempergb

Github MIT licensed Cargo Documentation

Convert a color temperature into RGB

This is a rust port of the work by Tanner Helland

Example

use tempergb::{rgb_from_temperature, Color};
let temperature = 2500;
let rgb = tempergb::rgb_from_temperature(temperature);
assert_eq!(rgb, (255, 159, 70));
assert_eq!(rgb.r(), 255);
assert_eq!(rgb.g(), 159);
assert_eq!(rgb.b(), 70);

About

Convert temperature to RGB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages