colortypes-0.1.4 has been yanked.
colortypes
A type safe color conversion library
This crate provides many methods for converting between color types.
Everything is implemented abstractly, and is easily extensible by the user.
When converting you call the from_color method of the colortype struct on your color!
Implemented conversions:
| From | To | Method |
|---|---|---|
| RGB | XYZ | Directly |
| RGB | HSV | Directly |
| RGB | HSL | Directly |
| RGB | LCH | Through XYZ |
| RGB | LAB | Through XYZ |
| LAB | LCH | Directly |
Example usage
use ;
>;
// Or can call Color and specify Rgba this way
let color = D65 }>new;
// To convert to Xyza
let new_color = from_color;
}
Images
This crate also provides a type for dealing with images, it's still work in progress
use ;
>new;
img.put_pixel;
let new_img = img.;
let new_img_b = img.;
let mut new_img = .;
new_img = new_img.crop_align;
let my_col = new_img.get_pixel;
}