Enum palette::Color [−][src]
pub enum Color<S = Srgb, T = f32> where
T: Float + Component,
S: RgbSpace, { Luma(Luma<Linear<S::WhitePoint>, T>), Rgb(Rgb<Linear<S>, T>), Xyz(Xyz<S::WhitePoint, T>), Yxy(Yxy<S::WhitePoint, T>), Lab(Lab<S::WhitePoint, T>), Lch(Lch<S::WhitePoint, T>), Hsv(Hsv<S, T>), Hsl(Hsl<S, T>), Hwb(Hwb<S, T>), }
A generic color type.
The Color
may belong to any color space and it may change
depending on which operation is performed. That makes it immune to
the "without conversion" rule of the operations it supports. The
color spaces are selected as follows:
Mix
: RGB for no particular reason, except that it's intuitive.Shade
: CIE L*a*b* for its luminance component.Hue
andGetHue
: CIE L*C*h° for its hue component and how it preserves the apparent lightness.Saturate
: CIE L*C*h° for its chromaticity component and how it preserves the apparent lightness.
It's not recommended to use Color
when full control is necessary,
but it can easily be converted to a fixed color space in those
cases.
Variants
Luma(Luma<Linear<S::WhitePoint>, T>)
Linear luminance.
Rgb(Rgb<Linear<S>, T>)
Linear RGB.
Xyz(Xyz<S::WhitePoint, T>)
CIE 1931 XYZ.
Yxy(Yxy<S::WhitePoint, T>)
CIE 1931 Yxy.
Lab(Lab<S::WhitePoint, T>)
CIE L*a*b* (CIELAB).
Lch(Lch<S::WhitePoint, T>)
CIE L*C*h°, a polar version of CIE L*a*b*.
Hsv(Hsv<S, T>)
Linear HSV, a cylindrical version of RGB.
Hsl(Hsl<S, T>)
Linear HSL, a cylindrical version of RGB.
Hwb(Hwb<S, T>)
Linear HWB, an intuitive cylindrical version of RGB.
Methods
impl<T: Float + Component> Color<Srgb, T>
[src]
impl<T: Float + Component> Color<Srgb, T>
pub fn linear_y(luma: T) -> Color<Srgb, T>
[src]
pub fn linear_y(luma: T) -> Color<Srgb, T>
Linear luminance.
pub fn linear_rgb(red: T, green: T, blue: T) -> Color<Srgb, T>
[src]
pub fn linear_rgb(red: T, green: T, blue: T) -> Color<Srgb, T>
Linear RGB.
pub fn xyz(x: T, y: T, z: T) -> Color<Srgb, T>
[src]
pub fn xyz(x: T, y: T, z: T) -> Color<Srgb, T>
CIE XYZ.
pub fn yxy(x: T, y: T, luma: T) -> Color<Srgb, T>
[src]
pub fn yxy(x: T, y: T, luma: T) -> Color<Srgb, T>
CIE Yxy.
pub fn lab(l: T, a: T, b: T) -> Color<Srgb, T>
[src]
pub fn lab(l: T, a: T, b: T) -> Color<Srgb, T>
CIE L*a*b*.
pub fn lch(l: T, chroma: T, hue: LabHue<T>) -> Color<Srgb, T>
[src]
pub fn lch(l: T, chroma: T, hue: LabHue<T>) -> Color<Srgb, T>
CIE L*C*h°.
pub fn hsv(hue: RgbHue<T>, saturation: T, value: T) -> Color<Srgb, T>
[src]
pub fn hsv(hue: RgbHue<T>, saturation: T, value: T) -> Color<Srgb, T>
Linear HSV.
pub fn hsl(hue: RgbHue<T>, saturation: T, lightness: T) -> Color<Srgb, T>
[src]
pub fn hsl(hue: RgbHue<T>, saturation: T, lightness: T) -> Color<Srgb, T>
Linear HSL.
pub fn hwb(hue: RgbHue<T>, whiteness: T, balckness: T) -> Color<Srgb, T>
[src]
pub fn hwb(hue: RgbHue<T>, whiteness: T, balckness: T) -> Color<Srgb, T>
Linear HWB.
Trait Implementations
impl<S, T> From<Color<S, T>> for Hsl<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Hsl<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<S, T> From<Color<S, T>> for Alpha<Hsl<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Alpha<Hsl<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<S, T> From<Color<S, T>> for Hsv<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Hsv<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<S, T> From<Color<S, T>> for Alpha<Hsv<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Alpha<Hsv<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<S, T> From<Color<S, T>> for Hwb<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Hwb<S, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<S, T> From<Color<S, T>> for Alpha<Hwb<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
[src]
impl<S, T> From<Color<S, T>> for Alpha<Hwb<S, T>, T> where
T: Component + Float,
S: RgbSpace,
T: Component + Float,
impl<Wp, T, _S> From<Color<_S, T>> for Lab<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Lab<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Lab<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Lab<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Lch<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Lch<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Lch<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Lch<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<S, T, _S> From<Color<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: Component + Float,
_S: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> From<Color<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: Component + Float,
_S: RgbSpace<WhitePoint = S::WhitePoint>,
impl<S, T, _S> From<Color<_S, T>> for Alpha<Luma<S, T>, T> where
T: Component,
S: LumaStandard,
T: Component + Float,
_S: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> From<Color<_S, T>> for Alpha<Luma<S, T>, T> where
T: Component,
S: LumaStandard,
T: Component + Float,
_S: RgbSpace<WhitePoint = S::WhitePoint>,
impl<S: RgbStandard, T: Component> From<Color<S::Space, T>> for Rgb<S, T> where
T: Component + Float,
[src]
impl<S: RgbStandard, T: Component> From<Color<S::Space, T>> for Rgb<S, T> where
T: Component + Float,
impl<S: RgbStandard, T: Component> From<Color<S::Space, T>> for Alpha<Rgb<S, T>, T> where
T: Component + Float,
[src]
impl<S: RgbStandard, T: Component> From<Color<S::Space, T>> for Alpha<Rgb<S, T>, T> where
T: Component + Float,
impl<Wp, T, _S> From<Color<_S, T>> for Xyz<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Xyz<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Xyz<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Xyz<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Yxy<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Yxy<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Yxy<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> From<Color<_S, T>> for Alpha<Yxy<Wp, T>, T> where
T: Component + Float,
Wp: WhitePoint,
T: Component + Float,
_S: RgbSpace<WhitePoint = Wp>,
impl<S: Debug, T: Debug> Debug for Color<S, T> where
T: Float + Component,
S: RgbSpace,
S::WhitePoint: Debug,
[src]
impl<S: Debug, T: Debug> Debug for Color<S, T> where
T: Float + Component,
S: RgbSpace,
S::WhitePoint: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<S, T> Copy for Color<S, T> where
S: RgbSpace,
T: Float + Component,
[src]
impl<S, T> Copy for Color<S, T> where
S: RgbSpace,
T: Float + Component,
impl<S, T> Clone for Color<S, T> where
S: RgbSpace,
T: Float + Component,
[src]
impl<S, T> Clone for Color<S, T> where
S: RgbSpace,
T: Float + Component,
fn clone(&self) -> Color<S, T>
[src]
fn clone(&self) -> Color<S, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S, T> Default for Color<S, T> where
S: RgbSpace,
T: Float + Component,
[src]
impl<S, T> Default for Color<S, T> where
S: RgbSpace,
T: Float + Component,
impl<S, T> Mix for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> Mix for Color<S, T> where
T: Float + Component,
S: RgbSpace,
type Scalar = T
The type of the mixing factor.
fn mix(&self, other: &Color<S, T>, factor: T) -> Color<S, T>
[src]
fn mix(&self, other: &Color<S, T>, factor: T) -> Color<S, T>
Mix the color with an other color, by factor
. Read more
impl<S, T> Shade for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> Shade for Color<S, T> where
T: Float + Component,
S: RgbSpace,
type Scalar = T
The type of the lighten/darken amount.
fn lighten(&self, amount: T) -> Color<S, T>
[src]
fn lighten(&self, amount: T) -> Color<S, T>
Lighten the color by amount
.
fn darken(&self, amount: Self::Scalar) -> Self
[src]
fn darken(&self, amount: Self::Scalar) -> Self
Darken the color by amount
.
impl<S, T> GetHue for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> GetHue for Color<S, T> where
T: Float + Component,
S: RgbSpace,
type Hue = LabHue<T>
The kind of hue unit this color space uses. Read more
fn get_hue(&self) -> Option<LabHue<T>>
[src]
fn get_hue(&self) -> Option<LabHue<T>>
Calculate a hue if possible. Read more
impl<S, T> Hue for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> Hue for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn with_hue<H: Into<Self::Hue>>(&self, hue: H) -> Color<S, T>
[src]
fn with_hue<H: Into<Self::Hue>>(&self, hue: H) -> Color<S, T>
Return a new copy of self
, but with a specific hue.
fn shift_hue<H: Into<Self::Hue>>(&self, amount: H) -> Color<S, T>
[src]
fn shift_hue<H: Into<Self::Hue>>(&self, amount: H) -> Color<S, T>
Return a new copy of self
, but with the hue shifted by amount
.
impl<S, T> Saturate for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> Saturate for Color<S, T> where
T: Float + Component,
S: RgbSpace,
type Scalar = T
The type of the (de)saturation factor.
fn saturate(&self, factor: T) -> Color<S, T>
[src]
fn saturate(&self, factor: T) -> Color<S, T>
Increase the saturation by factor
.
fn desaturate(&self, factor: Self::Scalar) -> Self
[src]
fn desaturate(&self, factor: Self::Scalar) -> Self
Decrease the saturation by factor
.
impl<S, T> Blend for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> Blend for Color<S, T> where
T: Float + Component,
S: RgbSpace,
type Color = Rgb<Linear<S>, T>
The core color type. Typically Self
for color types without alpha.
fn into_premultiplied(self) -> PreAlpha<Rgb<Linear<S>, T>, T>
[src]
fn into_premultiplied(self) -> PreAlpha<Rgb<Linear<S>, T>, T>
Convert the color to premultiplied alpha.
fn from_premultiplied(color: PreAlpha<Rgb<Linear<S>, T>, T>) -> Self
[src]
fn from_premultiplied(color: PreAlpha<Rgb<Linear<S>, T>, T>) -> Self
Convert the color from premultiplied alpha.
fn blend<F>(self, destination: Self, blend_function: F) -> Self where
F: BlendFunction<Self::Color>,
[src]
fn blend<F>(self, destination: Self, blend_function: F) -> Self where
F: BlendFunction<Self::Color>,
Blend self, as the source color, with destination
, using blend_function
. Anything that implements BlendFunction
is acceptable, including functions and closures. Read more
fn over(self, other: Self) -> Self
[src]
fn over(self, other: Self) -> Self
Place self
over other
. This is the good old common alpha composition equation. Read more
fn inside(self, other: Self) -> Self
[src]
fn inside(self, other: Self) -> Self
Results in the parts of self
that overlaps the visible parts of other
. Read more
fn outside(self, other: Self) -> Self
[src]
fn outside(self, other: Self) -> Self
Results in the parts of self
that lies outside the visible parts of other
. Read more
fn atop(self, other: Self) -> Self
[src]
fn atop(self, other: Self) -> Self
Place self
over only the visible parts of other
.
fn xor(self, other: Self) -> Self
[src]
fn xor(self, other: Self) -> Self
Results in either self
or other
, where they do not overlap.
fn plus(self, other: Self) -> Self
[src]
fn plus(self, other: Self) -> Self
Add self
and other
. This uses the alpha component to regulate the effect, so it's not just plain component wise addition. Read more
fn multiply(self, other: Self) -> Self
[src]
fn multiply(self, other: Self) -> Self
Multiply self
with other
. This uses the alpha component to regulate the effect, so it's not just plain component wise multiplication. Read more
fn screen(self, other: Self) -> Self
[src]
fn screen(self, other: Self) -> Self
Make a color which is at least as light as self
or other
.
fn overlay(self, other: Self) -> Self
[src]
fn overlay(self, other: Self) -> Self
Multiply self
or other
if other is dark, or screen them if other
is light. This results in an S curve. Read more
fn darken(self, other: Self) -> Self
[src]
fn darken(self, other: Self) -> Self
Return the darkest parts of self
and other
.
fn lighten(self, other: Self) -> Self
[src]
fn lighten(self, other: Self) -> Self
Return the lightest parts of self
and other
.
fn dodge(self, other: Self) -> Self
[src]
fn dodge(self, other: Self) -> Self
Lighten other
to reflect self
. Results in other
if self
is black. Read more
fn burn(self, other: Self) -> Self
[src]
fn burn(self, other: Self) -> Self
Darken other
to reflect self
. Results in other
if self
is white. Read more
fn hard_light(self, other: Self) -> Self
[src]
fn hard_light(self, other: Self) -> Self
Multiply self
or other
if other is dark, or screen them if self
is light. This is similar to overlay
, but depends on self
instead of other
. Read more
fn soft_light(self, other: Self) -> Self
[src]
fn soft_light(self, other: Self) -> Self
Lighten other
if self
is light, or darken other
as if it's burned if self
is dark. The effect is increased if the components of self
is further from 0.5. Read more
fn difference(self, other: Self) -> Self
[src]
fn difference(self, other: Self) -> Self
Return the absolute difference between self
and other
. It's basically abs(self - other)
, but regulated by the alpha component. Read more
fn exclusion(self, other: Self) -> Self
[src]
fn exclusion(self, other: Self) -> Self
Similar to difference
, but appears to result in a lower contrast. other
is inverted if self
is white, and preserved if self
is black. Read more
impl<S, T> ApproxEq for Color<S, T> where
T: Float + Component + ApproxEq,
T::Epsilon: Float,
S: RgbSpace,
[src]
impl<S, T> ApproxEq for Color<S, T> where
T: Float + Component + ApproxEq,
T::Epsilon: Float,
S: RgbSpace,
type Epsilon = T::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
impl<S, T> From<Luma<Linear<S::WhitePoint>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Luma<Linear<S::WhitePoint>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Alpha<Luma<Linear<S::WhitePoint>, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Luma<Linear<S::WhitePoint>, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn from(color: Alpha<Luma<Linear<S::WhitePoint>, T>, T>) -> Color<S, T>
[src]
fn from(color: Alpha<Luma<Linear<S::WhitePoint>, T>, T>) -> Color<S, T>
Performs the conversion.
impl<S, T> From<Rgb<Linear<S>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Rgb<Linear<S>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Alpha<Rgb<Linear<S>, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Rgb<Linear<S>, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Xyz<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Xyz<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn from(color: Xyz<S::WhitePoint, T>) -> Color<S, T>
[src]
fn from(color: Xyz<S::WhitePoint, T>) -> Color<S, T>
Performs the conversion.
impl<S, T> From<Alpha<Xyz<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Xyz<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Yxy<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Yxy<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn from(color: Yxy<S::WhitePoint, T>) -> Color<S, T>
[src]
fn from(color: Yxy<S::WhitePoint, T>) -> Color<S, T>
Performs the conversion.
impl<S, T> From<Alpha<Yxy<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Yxy<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Lab<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Lab<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn from(color: Lab<S::WhitePoint, T>) -> Color<S, T>
[src]
fn from(color: Lab<S::WhitePoint, T>) -> Color<S, T>
Performs the conversion.
impl<S, T> From<Alpha<Lab<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Lab<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Lch<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Lch<S::WhitePoint, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
fn from(color: Lch<S::WhitePoint, T>) -> Color<S, T>
[src]
fn from(color: Lch<S::WhitePoint, T>) -> Color<S, T>
Performs the conversion.
impl<S, T> From<Alpha<Lch<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Lch<S::WhitePoint, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Hsv<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Hsv<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Alpha<Hsv<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Hsv<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Hsl<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Hsl<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Alpha<Hsl<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Hsl<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Hwb<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Hwb<S, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
impl<S, T> From<Alpha<Hwb<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,
[src]
impl<S, T> From<Alpha<Hwb<S, T>, T>> for Color<S, T> where
T: Float + Component,
S: RgbSpace,