pub trait ColorMixPolar<T, U>: Sized{
// 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.
Per CSS Color 4 12.3, premultiplied alpha is used for non-hue components. The hue component is NOT premultiplied - it is interpolated directly using the specified hue interpolation method.
Required Methods§
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.