tempergb

Crates.iotempergb
lib.rstempergb
version0.1.2
sourcesrc
created_at2022-06-27 10:34:37.805646
updated_at2022-06-27 10:51:39.28446
descriptionConvert a color temperature to RGB values
homepage
repositoryhttps://github.com/m-lima/tempergb
max_upload_size
id614053
size9,483
(m-lima)

documentation

README

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);
Commit count: 6

cargo fmt