| Crates.io | color_conv |
| lib.rs | color_conv |
| version | 0.2.1 |
| created_at | 2021-02-25 03:49:59.559254+00 |
| updated_at | 2021-02-25 05:16:11.126231+00 |
| description | A color conversion library for Rust |
| homepage | |
| repository | https://github.com/safinsingh/color_conv |
| max_upload_size | |
| id | 360244 |
| size | 49,513 |
color_conv is a simple and lightweight helper library for easily and programmatically converting between the RGB, CMYK, HSL, and hex color formats.
[dependencies]
color_conv = "0.2.1"
use color_conv::Color;
use color_conv::Cmyk;
use color_conv::Rgb;
let cyan = Cmyk::new_unchecked(100, 0, 0, 0);
let cyan_rgb = cyan.to_rgb();
assert_eq!(Rgb::new(0, 255, 255), cyan_rgb);