Trait palette::ComponentWise
source · [−]pub trait ComponentWise {
type Scalar;
fn component_wise<F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar>(
&self,
other: &Self,
f: F
) -> Self;
fn component_wise_self<F: FnMut(Self::Scalar) -> Self::Scalar>(
&self,
f: F
) -> Self;
}
Expand description
Perform a unary or binary operation on each component of a color.
Required Associated Types
Required Methods
Perform a binary operation on this and an other color.
fn component_wise_self<F: FnMut(Self::Scalar) -> Self::Scalar>(
&self,
f: F
) -> Self
fn component_wise_self<F: FnMut(Self::Scalar) -> Self::Scalar>(
&self,
f: F
) -> Self
Perform a unary operation on this color.