pub trait Color: Unpin + PartialEq + Eq + PartialOrd + Ord + Clone + Sync + Send + Debug {
const NAME: &'static str;
const CHANNELS: Channel;
const ALPHA: Option<Channel> = None;
// Required methods
fn to_rgb(src: &Pixel<Self>, dest: &mut Pixel<Rgb>);
fn from_rgb(pixel: &Pixel<Rgb>, dest: &mut Pixel<Self>);
// Provided method
fn convert<ToColor: Color>(src: &Pixel<Self>, dest: &mut Pixel<ToColor>) { ... }
}
Expand description
Color
trait is used to define color spaces