[][src]Trait prisma::Color

pub trait Color: Clone + PartialEq {
    type Tag;
    type ChannelsTuple;
    fn num_channels() -> u32;
fn to_tuple(self) -> Self::ChannelsTuple; }

The base color trait, representing any color

The main use of Color is to manipulate and act on colors in a generic context. It is used extensively internally.

Associated Types

type Tag

The unique tag unit struct identifying the color type

type ChannelsTuple

A tuple of types for each channel in the color

Loading content...

Required methods

fn num_channels() -> u32

Return how many channels the color has

fn to_tuple(self) -> Self::ChannelsTuple

Convert a color into a tuple of channels

Loading content...

Implementors

impl<C, E> Color for EncodedColor<C, E> where
    C: Color + EncodableColor,
    E: ColorEncoding + PartialEq
[src]

impl<T> Color for Rgb<T> where
    T: PosNormalChannelScalar
[src]

type Tag = RgbTag

type ChannelsTuple = (T, T, T)

impl<T> Color for Rgi<T> where
    T: PosNormalChannelScalar + Float
[src]

type Tag = RgiTag

type ChannelsTuple = (T, T, T)

impl<T> Color for XyY<T> where
    T: FreeChannelScalar + PosNormalChannelScalar + Float
[src]

type Tag = XyYTag

type ChannelsTuple = (T, T, T)

impl<T> Color for Xyz<T> where
    T: FreeChannelScalar
[src]

type Tag = XyzTag

type ChannelsTuple = (T, T, T)

impl<T> Color for BareYCbCr<T> where
    T: PosNormalChannelScalar + NormalChannelScalar
[src]

type Tag = YCbCrTag

type ChannelsTuple = (T, T, T)

impl<T, A> Color for Hsi<T, A> where
    T: PosNormalChannelScalar,
    A: AngularChannelScalar
[src]

type Tag = HsiTag

type ChannelsTuple = (A, T, T)

impl<T, A> Color for Hsl<T, A> where
    T: PosNormalChannelScalar,
    A: AngularChannelScalar
[src]

type Tag = HslTag

type ChannelsTuple = (A, T, T)

impl<T, A> Color for Hsv<T, A> where
    T: PosNormalChannelScalar,
    A: AngularChannelScalar
[src]

type Tag = HsvTag

type ChannelsTuple = (A, T, T)

impl<T, A> Color for Hwb<T, A> where
    T: PosNormalChannelScalar + Float,
    A: AngularChannelScalar
[src]

type Tag = HwbTag

type ChannelsTuple = (A, T, T)

impl<T, A> Color for eHsi<T, A> where
    T: PosNormalChannelScalar,
    A: AngularChannelScalar
[src]

type Tag = EHsiTag

type ChannelsTuple = (A, T, T)

impl<T, C, E, S> Color for SpacedColor<T, C, E, S> where
    C: Color + EncodableColor,
    S: ColorSpace<T> + PartialEq + Clone,
    E: ColorEncoding + PartialEq,
    T: PartialEq + Clone + Float
[src]

impl<T, InnerColor> Color for Alpha<T, InnerColor> where
    T: PosNormalChannelScalar,
    InnerColor: Color
[src]

type Tag = AlphaTag<InnerColor::Tag>

type ChannelsTuple = (InnerColor::ChannelsTuple, T)

impl<T, M> Color for YCbCr<T, M> where
    T: NormalChannelScalar + PosNormalChannelScalar,
    M: YCbCrModel<T>, 
[src]

type Tag = YCbCrTag

type ChannelsTuple = (T, T, T)

impl<T, Model> Color for Lms<T, Model> where
    T: FreeChannelScalar,
    Model: LmsModel<T>, 
[src]

type Tag = LmsTag

type ChannelsTuple = (T, T, T)

impl<T, W> Color for Lab<T, W> where
    T: FreeChannelScalar,
    W: WhitePoint<T>, 
[src]

type Tag = LabTag

type ChannelsTuple = (T, T, T)

impl<T, W> Color for Luv<T, W> where
    T: FreeChannelScalar,
    W: WhitePoint<T>, 
[src]

type Tag = LuvTag

type ChannelsTuple = (T, T, T)

impl<T, W, A> Color for Lchab<T, W, A> where
    T: FreeChannelScalar,
    A: AngularChannelScalar,
    W: WhitePoint<T>, 
[src]

type Tag = LchabTag

type ChannelsTuple = (T, T, A)

impl<T, W, A> Color for Lchuv<T, W, A> where
    T: FreeChannelScalar,
    A: AngularChannelScalar,
    W: WhitePoint<T>, 
[src]

type Tag = LchuvTag

type ChannelsTuple = (T, T, A)

Loading content...