[][src]Struct nannou::color::Lch

pub struct Lch<T = f32> where
    T: Float
{ pub l: T, pub chroma: T, pub hue: LabHue<T>, }

CIE LCh°, a polar version of CIE Lab*.

LCh° shares its range and perceptual uniformity with Lab*, but it's a cylindrical color space, like HSL and HSV. This gives it the same ability to directly change the hue and colorfulness of a color, while preserving other visual aspects.

Fields

l: T

L* is the lightness of the color. 0.0 gives absolute black and 1.0 give the brightest white.

chroma: T

C* is the colorfulness of the color. It's similar to saturation. 0.0 gives gray scale colors, and numbers around 1.0-1.41421356 gives fully saturated colors. The upper limit of 1.41421356 (or sqrt(2.0)) should include the whole Lab* space and some more.

hue: LabHue<T>

The hue of the color, in degrees. Decides if it's red, blue, purple, etc.

Methods

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

pub fn new(l: T, chroma: T, hue: LabHue<T>) -> Lch<T>[src]

CIE LCh°.

Trait Implementations

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

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

Convert into HWB color space

impl<T> ApproxEq for Lch<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> From<Lch<T>> for Hwb<T> where
    T: Float
[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn from_yxy(inp: Yxy<T>) -> Self[src]

Convert from Yxy 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

fn from_luma(inp: Luma<T>) -> Self[src]

Convert from Luma

impl<T> Shade for Lch<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> Debug for Lch<T> where
    T: Debug + Float
[src]

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

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

type Scalar = T

The type of the mixing factor.

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

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

type Output = Lch<T>

The resulting type after applying the + operator.

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

type Output = Lch<T>

The resulting type after applying the + operator.

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

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

type Output = Lch<T>

The resulting type after applying the - operator.

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

type Output = Lch<T>

The resulting type after applying the - operator.

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

type Scalar = T

The type of the (de)saturation factor.

fn desaturate(&self, factor: Self::Scalar) -> Self[src]

Decrease the saturation by factor.

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

type Hue = LabHue<T>

The kind of hue unit this color space uses. Read more

impl<T> Clone for Lch<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 Lch<S> where
    S: Float + One
[src]

Auto Trait Implementations

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

impl<T> Sync for Lch<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> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<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<T> Erased for T

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.