pub trait ColorMix<T, U>: Sized{
// Required method
fn mix(first: T, second: U, percentage: f64) -> Self;
}
Expand description
Trait for calculating mixing two colors together.
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).
Required Methods§
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.