Trait palette::IntoColor
[−]
[src]
pub trait IntoColor<Wp = D65, T = f32>: Sized where
T: Float,
Wp: WhitePoint, { fn into_xyz(self) -> Xyz<Wp, T>; fn into_yxy(self) -> Yxy<Wp, T> { ... } fn into_lab(self) -> Lab<Wp, T> { ... } fn into_lch(self) -> Lch<Wp, T> { ... } fn into_rgb<S: RgbSpace<WhitePoint = Wp>>(self) -> Rgb<Linear<S>, T> { ... } fn into_hsl<S: RgbSpace<WhitePoint = Wp>>(self) -> Hsl<S, T> { ... } fn into_hsv<S: RgbSpace<WhitePoint = Wp>>(self) -> Hsv<S, T> { ... } fn into_hwb<S: RgbSpace<WhitePoint = Wp>>(self) -> Hwb<S, T> { ... } fn into_luma(self) -> Luma<Wp, 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<Wp, T>
Convert into Yxy color space
fn into_lab(self) -> Lab<Wp, T>
Convert into L*a*b* color space
fn into_lch(self) -> Lch<Wp, T>
Convert into L*C*h° color space
fn into_rgb<S: RgbSpace<WhitePoint = Wp>>(self) -> Rgb<Linear<S>, T>
Convert into RGB color space.
fn into_hsl<S: RgbSpace<WhitePoint = Wp>>(self) -> Hsl<S, T>
Convert into HSL color space
fn into_hsv<S: RgbSpace<WhitePoint = Wp>>(self) -> Hsv<S, T>
Convert into HSV color space
fn into_hwb<S: RgbSpace<WhitePoint = Wp>>(self) -> Hwb<S, T>
Convert into HWB color space
fn into_luma(self) -> Luma<Wp, T>
Convert into Luma
Implementors
impl<S, T, Wp> IntoColor<Wp, T> for Rgb<S, T> where
S: RgbStandard,
T: Float,
Wp: WhitePoint,
S::Space: RgbSpace<WhitePoint = Wp>,impl<Wp, T> IntoColor<Wp, T> for Xyz<Wp, T> where
T: Float,
Wp: WhitePoint,impl<Wp, T> IntoColor<Wp, T> for Yxy<Wp, T> where
T: Float,
Wp: WhitePoint,impl<Wp, T> IntoColor<Wp, T> for Lab<Wp, T> where
T: Float,
Wp: WhitePoint,impl<Wp, T> IntoColor<Wp, T> for Lch<Wp, T> where
T: Float,
Wp: WhitePoint,impl<Wp, T> IntoColor<Wp, T> for Luma<Wp, T> where
T: Float,
Wp: WhitePoint,impl<S, Wp, T> IntoColor<Wp, T> for Hsl<S, T> where
T: Float,
Wp: WhitePoint,
S: RgbSpace<WhitePoint = Wp>,impl<S, Wp, T> IntoColor<Wp, T> for Hsv<S, T> where
T: Float,
Wp: WhitePoint,
S: RgbSpace<WhitePoint = Wp>,impl<S, Wp, T> IntoColor<Wp, T> for Hwb<S, T> where
T: Float,
Wp: WhitePoint,
S: RgbSpace<WhitePoint = Wp>,