[][src]Struct deltae::LchValue

pub struct LchValue {
    pub l: f32,
    pub c: f32,
    pub h: f32,
}

Lch: Luminance, Chroma, Hue

ValueColorRange
L*Light <---> Dark0 <---> 100
cChroma (Amount of color)0 <---> 181.0139
hHue (Degrees)0 <---> 360°

Fields

l: f32

Lightness

c: f32

Chroma

h: f32

Hue (in degrees)

Methods

impl LchValue[src]

pub fn new(l: f32, c: f32, h: f32) -> Result<LchValue, ValueError>[src]

Returns a result of an LchValue from 3 f32s. Will return Err() if the values are out of range

pub fn hue_radians(&self) -> f32[src]

Returns the Hue as radians rather than degrees

Trait Implementations

impl Round for LchValue[src]

impl Validate for LchValue[src]

impl From<LchValue> for LabValue[src]

impl<'_> From<&'_ LchValue> for LabValue[src]

impl<'_> From<&'_ LchValue> for LchValue[src]

impl From<LabValue> for LchValue[src]

impl<'_> From<&'_ LabValue> for LchValue[src]

impl From<XyzValue> for LchValue[src]

impl<'_> From<&'_ XyzValue> for LchValue[src]

impl From<LchValue> for XyzValue[src]

impl<'_> From<&'_ LchValue> for XyzValue[src]

impl Default for LchValue[src]

impl Clone for LchValue[src]

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

Performs copy-assignment from source. Read more

impl<T: Delta + Copy> PartialEq<T> for LchValue where
    LchValue: From<T>, 
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Copy for LchValue[src]

impl Display for LchValue[src]

impl Debug for LchValue[src]

impl FromStr for LchValue[src]

type Err = ValueError

The associated error which can be returned from parsing.

impl<'_> TryFrom<&'_ [f32; 3]> for LchValue[src]

type Error = ValueError

The type returned in the event of a conversion error.

impl TryFrom<(f32, f32, f32)> for LchValue[src]

type Error = ValueError

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ (f32, f32, f32)> for LchValue[src]

type Error = ValueError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl Send for LchValue

impl Unpin for LchValue

impl Sync for LchValue

impl UnwindSafe for LchValue

impl RefUnwindSafe for LchValue

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[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]