Crate color_conv

Crate color_conv 

Source
Expand description

color_conv is a helper library for easily and programmatically converting between the RGB, CMYK, HSL, and hex color formats.

[dependencies]
color_conv = "0.2.1"

§Example

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);

Re-exports§

pub use self::cmyk::Cmyk;
pub use self::hsl::Hsl;
pub use self::rgb::Rgb;

Modules§

cmyk
CMYK-specific structures
hsl
HSL-specific strucures
rgb
RGB-specific strucures

Enums§

Error
Crate-wide Error type.

Traits§

Color
Unifying Color trait which encompasses each of the structs provided by this crate.