pub trait ColorModel: Clone + Copy + Debug + Default + PartialEq + Any {
    const CIRCULAR: Range<usize>;
    const LINEAR: Range<usize>;
    const ALPHA: usize;

    fn into_rgba<P>(p: P) -> PixRgba<P>
    where
        P: Pixel<Model = Self>
; fn from_rgba<P>(rgba: PixRgba<P>) -> P
    where
        P: Pixel<Model = Self>
; }
Expand description

Model for pixel colors.

Existing color models are Rgb, Bgr, Cmy, Gray, Hsv, Hsl, Hwb, YCbCr and Matte.

Required Associated Constants

Range of circular channel numbers

Range of linear channel numbers

Alpha channel number

Required Methods

Convert into red, green, blue and alpha components

Convert from red, green, blue and alpha components

Implementors