1 2 3 4 5 6 7 8 9 10 11 12 13 14
mod hex; mod hsl; mod rgb; pub use hex::Hex; pub use hsl::Hsl; pub use rgb::Rgb; use serde::Serialize; use std::fmt; pub trait Color: Clone + fmt::Display + Serialize { fn random() -> Self; fn random_with_alpha() -> Self; }