Trait ColorMixPolar

Source
pub trait ColorMixPolar<T, U>: Sized
where T: Into<Self>, U: Into<Self>,
{ // Required method fn mix_polar( first: T, second: U, percentage: f64, hue_interpolation: HueInterpolation, ) -> Self; }
Expand description

Trait for calculating mixing two colors together, with a hue direction for Polar colour spaces.

This trait provides a static method which will receive two colours, and can output a Self which should be the result of both colours mixed by the given percentage (the percentage pertains to how much the second colour should apply to the first). The Hue direction should be respected. If the colour space is not Polar then consider ColorMix instead.

Required Methods§

Source

fn mix_polar( first: T, second: U, percentage: f64, hue_interpolation: HueInterpolation, ) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, U> ColorMixPolar<T, U> for Hsl
where Self: From<T> + From<U>,

Source§

impl<T, U> ColorMixPolar<T, U> for Lch
where Self: From<T> + From<U>,

Source§

impl<T, U> ColorMixPolar<T, U> for Oklch
where Self: From<T> + From<U>,