Trait palette::chromatic_adaptation::AdaptFrom
source · pub trait AdaptFrom<S, Swp, Dwp, T>: Sized{
// Required method
fn adapt_from_using<M: TransformMatrix<Swp, Dwp, T>>(
color: S,
method: M
) -> Self;
// Provided method
fn adapt_from(color: S) -> Self { ... }
}
Expand description
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§
sourcefn adapt_from_using<M: TransformMatrix<Swp, Dwp, T>>(
color: S,
method: M
) -> Self
fn adapt_from_using<M: TransformMatrix<Swp, Dwp, T>>( color: S, method: M ) -> Self
Convert the source color to the destination color using the specified method
Provided Methods§
sourcefn adapt_from(color: S) -> Self
fn adapt_from(color: S) -> Self
Convert the source color to the destination color using the bradford method by default
Object Safety§
This trait is not object safe.