Struct rgb_derivation::Chromacity [−][src]
pub struct Chromacity<K>(_, _);
A colour chromacity represented as (x, y)
coordinates.
Implementations
impl<K: Signed> Chromacity<K>
[src]
impl<K: Signed> Chromacity<K>
[src]impl<K: Scalar> Chromacity<K> where
&'x K: RefNum<K>,
[src]
impl<K: Scalar> Chromacity<K> where
&'x K: RefNum<K>,
[src]pub fn to_xyz(&self) -> [K; 3]
[src]
Returns XYZ coordinates of a colour with given chromacity and luminosity (the Y coordinate) equal one.
Example
use rgb_derivation::*; let one = num::rational::Ratio::new(1i64, 1i64); let one_third = num::rational::Ratio::new(1i64, 3i64); let e = Chromacity::new(one_third, one_third).unwrap().to_xyz(); assert_eq!([one, one, one], e);
Trait Implementations
impl<K: Clone> Clone for Chromacity<K>
[src]
impl<K: Clone> Clone for Chromacity<K>
[src]fn clone(&self) -> Chromacity<K>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<K: Copy> Copy for Chromacity<K>
[src]
impl<K: Copy> Copy for Chromacity<K>
[src]impl<K: Eq> Eq for Chromacity<K>
[src]
impl<K: Eq> Eq for Chromacity<K>
[src]impl<K: Ord> Ord for Chromacity<K>
[src]
impl<K: Ord> Ord for Chromacity<K>
[src]impl<K: PartialEq> PartialEq<Chromacity<K>> for Chromacity<K>
[src]
impl<K: PartialEq> PartialEq<Chromacity<K>> for Chromacity<K>
[src]fn eq(&self, other: &Chromacity<K>) -> bool
[src]
fn ne(&self, other: &Chromacity<K>) -> bool
[src]
impl<K: PartialOrd> PartialOrd<Chromacity<K>> for Chromacity<K>
[src]
impl<K: PartialOrd> PartialOrd<Chromacity<K>> for Chromacity<K>
[src]fn partial_cmp(&self, other: &Chromacity<K>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<K> StructuralEq for Chromacity<K>
[src]
impl<K> StructuralEq for Chromacity<K>
[src]impl<K> StructuralPartialEq for Chromacity<K>
[src]
impl<K> StructuralPartialEq for Chromacity<K>
[src]Auto Trait Implementations
impl<K> RefUnwindSafe for Chromacity<K> where
K: RefUnwindSafe,
impl<K> RefUnwindSafe for Chromacity<K> where
K: RefUnwindSafe,
impl<K> Send for Chromacity<K> where
K: Send,
impl<K> Send for Chromacity<K> where
K: Send,
impl<K> Sync for Chromacity<K> where
K: Sync,
impl<K> Sync for Chromacity<K> where
K: Sync,
impl<K> Unpin for Chromacity<K> where
K: Unpin,
impl<K> Unpin for Chromacity<K> where
K: Unpin,
impl<K> UnwindSafe for Chromacity<K> where
K: UnwindSafe,
impl<K> UnwindSafe for Chromacity<K> where
K: UnwindSafe,