Crate color_operators[−][src]
Expand description
A library for converting, comparing, and preforming arithmetic on colors
Example
use color_operators::color::Color; use color_operators::hsl::HSL; use color_operators::hsv::HSV; use color_operators::rgb::RGB; let c_rgb = Color::new_rgb(255, 42, 90); let hsl = HSL::from_json_string(r#"{ "hue": 346.47887323943667, "saturation": 1.0, "lightness": 0.5823529411764706 }"#); let hsv = HSV::new(346.47887323943667, 0.8352941176470587, 1.0); assert_eq!(c_rgb, hsl); assert_eq!(c_rgb, hsv); assert_eq!(hsl, hsv);
Modules
color | Enumerable for currently supported color data structures |
hsl | Data structure for Hue, Saturation, Lightness encoded colors |
hsv | Data structure for Hue, Saturation, Value encoded colors |
rgb | Data structure for Red, Green, Blue encoded colors |