Struct Chromaticity
pub struct Chromaticity {
pub x: f32,
pub y: f32,
}Expand description
CIE xy chromaticity, specifying a color in the XYZ color space, but not its luminosity.
An absolute color can be specified by adding a luminosity coordinate Y as in xyY. An XYZ
color can be calculated from xyY as follows.
X = Y/y * x
Y = Y
Z = Y/y * (1 - x - y)Fields§
§x: f32The x-coordinate of the CIE xy chromaticity.
y: f32The y-coordinate of the CIE xy chromaticity.
Implementations§
§impl Chromaticity
impl Chromaticity
pub const D65: Chromaticity
pub const D65: Chromaticity
The CIE D65 white point under the standard 2° observer.
This is a common white point for color spaces targeting monitors.
The white point’s chromaticities are truncated to four digits here, as specified by the CSS Color 4 specification, and following most color spaces using this white point.
pub const D50: Chromaticity
pub const D50: Chromaticity
The CIE D50 white point under the standard 2° observer.
The white point’s chromaticities are truncated to four digits here, as specified by the CSS Color 4 specification, and following most color spaces using this white point.
pub const ACES: Chromaticity
pub const ACES: Chromaticity
The ACES white point.
This is the reference white of ACEScg and ACES2065-1. The white point is near the D60 white point under the standard 2° observer.
Trait Implementations§
§impl Clone for Chromaticity
impl Clone for Chromaticity
§fn clone(&self) -> Chromaticity
fn clone(&self) -> Chromaticity
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Chromaticity
impl Debug for Chromaticity
§impl PartialEq for Chromaticity
impl PartialEq for Chromaticity
impl Copy for Chromaticity
impl StructuralPartialEq for Chromaticity
Auto Trait Implementations§
impl Freeze for Chromaticity
impl RefUnwindSafe for Chromaticity
impl Send for Chromaticity
impl Sync for Chromaticity
impl Unpin for Chromaticity
impl UnwindSafe for Chromaticity
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more