[−][src]Struct nannou::color::Xyz
The CIE 1931 XYZ color space.
XYZ links the perceived colors to their wavelengths and simply makes it possible to describe the way we see colors as numbers. It's often used when converting from one color space to an other, and requires a standard illuminant and a standard observer to be defined.
Conversions and operations on this color space assumes the CIE Standard Illuminant D65 as the white point, and the 2° standard colorimetric observer.
Fields
x: T
X is the scale of what can be seen as a response curve for the cone cells in the human eye. It goes from 0.0 to 0.95047.
y: T
Y is the luminance of the color, where 0.0 is black and 1.0 is white.
z: T
Z is the scale of what can be seen as the blue stimulation. It goes from 0.0 to 1.08883.
Methods
impl<T> Xyz<T> where
T: Float,
[src]
T: Float,
Trait Implementations
impl<T> IntoColor<T> for Xyz<T> where
T: Float,
[src]
T: Float,
fn into_xyz(self) -> Xyz<T>
[src]
fn into_yxy(self) -> Yxy<T>
[src]
fn into_lab(self) -> Lab<T>
[src]
fn into_lch(self) -> Lch<T>
[src]
fn into_rgb(self) -> Rgb<T>
[src]
fn into_hsl(self) -> Hsl<T>
[src]
fn into_hsv(self) -> Hsv<T>
[src]
fn into_luma(self) -> Luma<T>
[src]
fn into_hwb(self) -> Hwb<T>
[src]
Convert into HWB color space
impl<T> ComponentWise for Xyz<T> where
T: Float,
[src]
T: Float,
type Scalar = T
The scalar type for color components.
fn component_wise<F>(&self, other: &Xyz<T>, f: F) -> Xyz<T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Xyz<T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
impl<T> ApproxEq for Xyz<T> where
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Copy,
<T as ApproxEq>::Epsilon: Float,
[src]
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Copy,
<T as ApproxEq>::Epsilon: Float,
type Epsilon = <T as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <Xyz<T> as ApproxEq>::Epsilon
[src]
fn default_max_relative() -> <Xyz<T> as ApproxEq>::Epsilon
[src]
fn default_max_ulps() -> u32
[src]
fn relative_eq(
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_relative: <Xyz<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_relative: <Xyz<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_eq(
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
fn relative_ne(
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_relative: <Xyz<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_relative: <Xyz<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_ne(
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Xyz<T>,
epsilon: <Xyz<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
impl<T> From<Xyz<T>> for Alpha<Lch<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Hwb<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Luma<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Rgb<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Luma<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Lch<T> where
T: Float,
[src]
T: Float,
impl<T> From<Lab<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Luma<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hwb<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Lab<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Color<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Luma<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Lch<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Hsl<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Lch<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hsl<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Rgb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Yxy<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hsl<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Yxy<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Yxy<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Xyz<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Rgb<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hsv<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Lab<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hsv<T>, T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Hsv<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Hsl<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Hsv<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Alpha<Lab<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Yxy<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Color<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Rgb<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> Div<Xyz<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the /
operator.
fn div(self, other: Xyz<T>) -> Xyz<T>
[src]
impl<T> Div<T> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the /
operator.
fn div(self, c: T) -> Xyz<T>
[src]
impl<T> Limited for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> Default for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> Mul<Xyz<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the *
operator.
fn mul(self, other: Xyz<T>) -> Xyz<T>
[src]
impl<T> Mul<T> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the *
operator.
fn mul(self, c: T) -> Xyz<T>
[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]
Convert from LCh° color space
fn from_hsl(inp: Hsl<T>) -> Self
[src]
Convert from HSL color space
fn from_hsv(inp: Hsv<T>) -> Self
[src]
Convert from HSV color space
fn from_hwb(inp: Hwb<T>) -> Self
[src]
Convert from HWB color space
impl<T> Shade for Xyz<T> where
T: Float,
[src]
T: Float,
type Scalar = T
The type of the lighten/darken amount.
fn lighten(&self, amount: T) -> Xyz<T>
[src]
fn darken(&self, amount: Self::Scalar) -> Self
[src]
Darken the color by amount
.
impl<T> Debug for Xyz<T> where
T: Debug + Float,
[src]
T: Debug + Float,
impl<T> Copy for Xyz<T> where
T: Copy + Float,
[src]
T: Copy + Float,
impl<T> Mix for Xyz<T> where
T: Float,
[src]
T: Float,
type Scalar = T
The type of the mixing factor.
fn mix(&self, other: &Xyz<T>, factor: T) -> Xyz<T>
[src]
impl<T> PartialEq<Xyz<T>> for Xyz<T> where
T: PartialEq<T> + Float,
[src]
T: PartialEq<T> + Float,
impl<T> Add<T> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the +
operator.
fn add(self, c: T) -> Xyz<T>
[src]
impl<T> Add<Xyz<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the +
operator.
fn add(self, other: Xyz<T>) -> Xyz<T>
[src]
impl<T> Sub<Xyz<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the -
operator.
fn sub(self, other: Xyz<T>) -> Xyz<T>
[src]
impl<T> Sub<T> for Xyz<T> where
T: Float,
[src]
T: Float,
type Output = Xyz<T>
The resulting type after applying the -
operator.
fn sub(self, c: T) -> Xyz<T>
[src]
impl<T> Clone for Xyz<T> where
T: Clone + Float,
[src]
T: Clone + Float,
fn clone(&self) -> Xyz<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S> IntoRgba<S> for Xyz<S> where
S: Float + One,
[src]
S: Float + One,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.