[−][src]Trait nannou::color::FromColor
FromColor provides conversion between the colors.
It requires from_xyz and derives conversion to other colors as a default from this. These defaults must be overridden when direct conversion exists between colors. For example, Luma has direct conversion to Rgb. So from_rgb conversion for Luma and from_luma for Rgb is implemented directly. The from for the same color must override the default. For example, from_rgb for Rgb will convert via Xyz which needs to be overridden with self to avoid the unnecessary converison.
Required methods
Loading content...Provided methods
fn from_yxy(inp: Yxy<T>) -> Self
Convert from Yxy color space
fn from_lab(inp: Lab<T>) -> Self
Convert from Lab* color space
fn from_lch(inp: Lch<T>) -> Self
Convert from LCh° color space
fn from_rgb(inp: Rgb<T>) -> Self
Convert from RGB color space
fn from_hsl(inp: Hsl<T>) -> Self
Convert from HSL color space
fn from_hsv(inp: Hsv<T>) -> Self
Convert from HSV color space
fn from_hwb(inp: Hwb<T>) -> Self
Convert from HWB color space
fn from_luma(inp: Luma<T>) -> Self
Convert from Luma
Implementors
impl<T> FromColor<T> for Hwb<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Hwb<T>
[src]
fn from_hsv(hsv: Hsv<T>) -> Hwb<T>
[src]
fn from_hwb(hwb: Hwb<T>) -> Hwb<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
fn from_lab(inp: Lab<T>) -> Self
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_rgb(inp: Rgb<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_luma(inp: Luma<T>) -> Self
[src]
impl<T> FromColor<T> for Lab<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Lab<T>
[src]
fn from_lab(lab: Lab<T>) -> Lab<T>
[src]
fn from_lch(lch: Lch<T>) -> Lab<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
fn from_rgb(inp: Rgb<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_hsv(inp: Hsv<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
fn from_luma(inp: Luma<T>) -> Self
[src]
impl<T> FromColor<T> for Lch<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Lch<T>
[src]
fn from_lab(lab: Lab<T>) -> Lch<T>
[src]
fn from_lch(lch: Lch<T>) -> Lch<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
fn from_rgb(inp: Rgb<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_hsv(inp: Hsv<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
fn from_luma(inp: Luma<T>) -> Self
[src]
impl<T> FromColor<T> for Luma<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Luma<T>
[src]
fn from_yxy(yxy: Yxy<T>) -> Luma<T>
[src]
fn from_rgb(rgb: Rgb<T>) -> Luma<T>
[src]
fn from_luma(luma: Luma<T>) -> Luma<T>
[src]
fn from_lab(inp: Lab<T>) -> Self
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_hsv(inp: Hsv<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
impl<T> FromColor<T> for Xyz<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Xyz<T>
[src]
fn from_rgb(rgb: Rgb<T>) -> Xyz<T>
[src]
fn from_yxy(yxy: Yxy<T>) -> Xyz<T>
[src]
fn from_lab(input_lab: Lab<T>) -> Xyz<T>
[src]
fn from_luma(luma: Luma<T>) -> Xyz<T>
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_hsv(inp: Hsv<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
impl<T> FromColor<T> for Yxy<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Yxy<T>
[src]
fn from_yxy(yxy: Yxy<T>) -> Yxy<T>
[src]
fn from_luma(luma: Luma<T>) -> Yxy<T>
[src]
fn from_lab(inp: Lab<T>) -> Self
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_rgb(inp: Rgb<T>) -> Self
[src]
fn from_hsl(inp: Hsl<T>) -> Self
[src]
fn from_hsv(inp: Hsv<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
impl<T> FromColor<T> for Hsl<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Hsl<T>
[src]
fn from_rgb(rgb: Rgb<T>) -> Hsl<T>
[src]
fn from_hsl(hsl: Hsl<T>) -> Hsl<T>
[src]
fn from_hsv(hsv: Hsv<T>) -> Hsl<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
fn from_lab(inp: Lab<T>) -> Self
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_hwb(inp: Hwb<T>) -> Self
[src]
fn from_luma(inp: Luma<T>) -> Self
[src]
impl<T> FromColor<T> for Hsv<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Hsv<T>
[src]
fn from_rgb(rgb: Rgb<T>) -> Hsv<T>
[src]
fn from_hsl(hsl: Hsl<T>) -> Hsv<T>
[src]
fn from_hsv(hsv: Hsv<T>) -> Hsv<T>
[src]
fn from_hwb(hwb: Hwb<T>) -> Hsv<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
fn from_lab(inp: Lab<T>) -> Self
[src]
fn from_lch(inp: Lch<T>) -> Self
[src]
fn from_luma(inp: Luma<T>) -> Self
[src]
impl<T> FromColor<T> for Rgb<T> where
T: Float,
[src]
T: Float,