Module color_operators::color[][src]

Expand description

Enumerable for currently supported color data structures

Example

use color_operators::color::Color;
use color_operators::rgb::RGB;

let c_rgb = Color::new_rgb(255, 42, 90);

assert!(c_rgb.is_rgb());

let rgb: RGB = c_rgb.into();

assert_eq!(rgb.get("red"), Ok(255));
assert_eq!(rgb.get("green"), Ok(42));
assert_eq!(rgb.get("blue"), Ok(90));

Enums

Color

Contains instances of supported color data structures