Trait palette::chromatic_adaptation::AdaptFrom[][src]

pub trait AdaptFrom<S, Swp, Dwp, T>: Sized where
    T: FloatComponent,
    Swp: WhitePoint,
    Dwp: WhitePoint
{ fn adapt_from_using<M: TransformMatrix<Swp, Dwp, T>>(
        color: S,
        method: M
    ) -> Self; fn adapt_from(color: S) -> Self { ... } }

Trait to convert color from one reference white point to another

Converts a color from the source white point (Swp) to the destination white point (Dwp). Uses the bradford method for conversion by default.

Required methods

fn adapt_from_using<M: TransformMatrix<Swp, Dwp, T>>(
    color: S,
    method: M
) -> Self
[src]

Convert the source color to the destination color using the specified method

Loading content...

Provided methods

fn adapt_from(color: S) -> Self[src]

Convert the source color to the destination color using the bradford method by default

Loading content...

Implementors

impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for D where
    T: FloatComponent,
    Swp: WhitePoint,
    Dwp: WhitePoint,
    S: IntoColorUnclamped<Xyz<Swp, T>>,
    D: FromColorUnclamped<Xyz<Dwp, T>>, 
[src]

Loading content...