Trait palette::IntoColor
[−]
[src]
pub trait IntoColor<T>: Sized where
T: Float, { fn into_xyz(self) -> Xyz<T>; fn into_yxy(self) -> Yxy<T> { ... } fn into_lab(self) -> Lab<T> { ... } fn into_lch(self) -> Lch<T> { ... } fn into_rgb(self) -> Rgb<T> { ... } fn into_hsl(self) -> Hsl<T> { ... } fn into_hsv(self) -> Hsv<T> { ... } fn into_hwb(self) -> Hwb<T> { ... } fn into_luma(self) -> Luma<T> { ... } }
IntoColor provides conversion between the colors.
It requires into into_xyz and derives conversion to other colors as a default from this. These defaults must be overridden when direct conversion exists between colors.
Required Methods
Provided Methods
fn into_yxy(self) -> Yxy<T>
Convert into Yxy color space
fn into_lab(self) -> Lab<T>
Convert into L*a*b* color space
fn into_lch(self) -> Lch<T>
Convert into L*C*h° color space
fn into_rgb(self) -> Rgb<T>
Convert into RGB color space.
fn into_hsl(self) -> Hsl<T>
Convert into HSL color space
fn into_hsv(self) -> Hsv<T>
Convert into HSV color space
fn into_hwb(self) -> Hwb<T>
Convert into HWB color space
fn into_luma(self) -> Luma<T>
Convert into Luma
Implementors
impl<T: Float> IntoColor<T> for Xyz<T>
impl<T: Float> IntoColor<T> for Yxy<T>
impl<T: Float> IntoColor<T> for Lab<T>
impl<T: Float> IntoColor<T> for Lch<T>
impl<T: Float> IntoColor<T> for Rgb<T>
impl<T: Float> IntoColor<T> for Hsl<T>
impl<T: Float> IntoColor<T> for Hsv<T>
impl<T: Float> IntoColor<T> for Hwb<T>
impl<T: Float> IntoColor<T> for Luma<T>