[][src]Struct nannou::color::Yxy

pub struct Yxy<T = f32> where
    T: Float
{ pub x: T, pub y: T, pub luma: T, }

The CIE 1931 Yxy (xyY) color space.

Yxy is a luminance-chromaticity color space derived from the CIE XYZ color space. It is widely used to define colors. The chromacity diagrams for the color spaces are a plot of this color space's x and y coordiantes.

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 chromacity co-ordinate derived from XYZ color space as X/(X+Y+Z). Typical range is between 0 and 1

y: T

y chromacity co-ordinate derived from XYZ color space as Y/(X+Y+Z). Typical range is between 0 and 1

luma: T

luma (Y) was a measure of the brightness or luminance of a color. It is the same as the Y from the XYZ color space. Its range is from 0 to 1, where 0 is black and 1 is white.

Methods

impl<T> Yxy<T> where
    T: Float
[src]

pub fn new(x: T, y: T, luma: T) -> Yxy<T>[src]

CIE Yxy.

Trait Implementations

impl<T> IntoColor<T> for Yxy<T> where
    T: Float
[src]

fn into_hwb(self) -> Hwb<T>[src]

Convert into HWB color space

impl<T> ComponentWise for Yxy<T> where
    T: Float
[src]

type Scalar = T

The scalar type for color components.

impl<T> From<Yxy<T>> for Alpha<Rgb<T>, T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Xyz<T>, T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Lab<T>, T> where
    T: Float
[src]

impl<T> From<Rgb<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Luma<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Yxy<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Hwb<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Luma<T> where
    T: Float
[src]

impl<T> From<Hsl<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Xyz<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Hsv<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Hsv<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Lch<T>, T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Hsl<T>, T> where
    T: Float
[src]

impl<T> From<Alpha<Hsl<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Color<T> where
    T: Float
[src]

impl<T> From<Lch<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Luma<T>, T> where
    T: Float
[src]

impl<T> From<Hwb<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Lab<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Hsv<T>, T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Hsl<T> where
    T: Float
[src]

impl<T> From<Luma<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Lch<T> where
    T: Float
[src]

impl<T> From<Lab<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Hwb<T> where
    T: Float
[src]

impl<T> From<Alpha<Lch<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Xyz<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Xyz<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Alpha<Hwb<T>, T> where
    T: Float
[src]

impl<T> From<Color<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Alpha<Rgb<T>, T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Rgb<T> where
    T: Float
[src]

impl<T> From<Hsv<T>> for Yxy<T> where
    T: Float
[src]

impl<T> From<Yxy<T>> for Lab<T> where
    T: Float
[src]

impl<T> Div<Yxy<T>> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the / operator.

impl<T> Div<T> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the / operator.

impl<T> Limited for Yxy<T> where
    T: Float
[src]

impl<T> Default for Yxy<T> where
    T: Float
[src]

impl<T> Mul<Yxy<T>> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the * operator.

impl<T> Mul<T> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the * operator.

impl<T> FromColor<T> for Yxy<T> where
    T: Float
[src]

fn from_lab(inp: Lab<T>) -> Self[src]

Convert from Lab* color space

fn from_lch(inp: Lch<T>) -> Self[src]

Convert from LCh° color space

fn from_rgb(inp: Rgb<T>) -> Self[src]

Convert from RGB 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 Yxy<T> where
    T: Float
[src]

type Scalar = T

The type of the lighten/darken amount.

fn darken(&self, amount: Self::Scalar) -> Self[src]

Darken the color by amount.

impl<T> Mix for Yxy<T> where
    T: Float
[src]

type Scalar = T

The type of the mixing factor.

impl<T> Debug for Yxy<T> where
    T: Debug + Float
[src]

impl<T> Copy for Yxy<T> where
    T: Copy + Float
[src]

impl<T> PartialEq<Yxy<T>> for Yxy<T> where
    T: PartialEq<T> + Float
[src]

impl<T> Add<Yxy<T>> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the + operator.

impl<T> Add<T> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the + operator.

impl<T> Sub<Yxy<T>> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the - operator.

impl<T> Sub<T> for Yxy<T> where
    T: Float
[src]

type Output = Yxy<T>

The resulting type after applying the - operator.

impl<T> ApproxEq for Yxy<T> where
    T: ApproxEq + Float,
    <T as ApproxEq>::Epsilon: Copy,
    <T as ApproxEq>::Epsilon: Float
[src]

type Epsilon = <T as ApproxEq>::Epsilon

Used for specifying relative comparisons.

impl<T> Clone for Yxy<T> where
    T: Clone + Float
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<S> IntoRgba<S> for Yxy<S> where
    S: Float + One
[src]

Auto Trait Implementations

impl<T> Send for Yxy<T> where
    T: Send

impl<T> Sync for Yxy<T> where
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Style for T where
    T: Any + Debug + PartialEq<T>, 
[src]

impl<T> Content for T[src]

impl<T> SafeBorrow<T> for T[src]

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    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>, 

Sets value as a parameter of self.