[−][src]Struct deltae::LchValue
Lch: Luminance, Chroma, Hue
Value | Color | Range |
|---|---|---|
L* | Light <---> Dark | 0 <---> 100 |
c | Chroma (Amount of color) | 0 <---> 181.0139 |
h | Hue (Degrees) | 0 <---> 360° |
Fields
l: f32Lightness
c: f32Chroma
h: f32Hue (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]
fn validate(self) -> Result<Self, ValueError>[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(&self) -> 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]
LchValue: From<T>,
fn eq(&self, other: &T) -> bool[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.
fn from_str(s: &str) -> Result<LchValue, ValueError>[src]
impl<'_> TryFrom<&'_ [f32; 3]> for LchValue[src]
type Error = ValueError
The type returned in the event of a conversion error.
fn try_from(slice: &[f32; 3]) -> Result<LchValue, ValueError>[src]
impl TryFrom<(f32, f32, f32)> for LchValue[src]
type Error = ValueError
The type returned in the event of a conversion error.
fn try_from(tuple: (f32, f32, f32)) -> Result<LchValue, ValueError>[src]
impl<'_> TryFrom<&'_ (f32, f32, f32)> for LchValue[src]
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]
T: Display + ?Sized,
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,