pub struct ViewingConditions {
pub n: f64,
pub aw: f64,
pub nbb: f64,
pub ncb: f64,
pub c: f64,
pub nc: f64,
pub rgb_d: [f64; 3],
pub fl: f64,
pub fl_root: f64,
pub z: f64,
}Expand description
The environment a color is seen in, with the CAM16 intermediates that depend only on it. Field names are CAM16’s own terms.
Fields§
§n: f64Background induction factor.
aw: f64Achromatic response of the white point.
nbb: f64Brightness induction factor.
ncb: f64Chromatic induction factor.
c: f64Impact of surround.
nc: f64Chromatic induction from surround.
rgb_d: [f64; 3]Per-channel degree of adaptation.
fl: f64Luminance-level adaptation factor.
fl_root: f64Fourth root of Self::fl.
z: f64Base exponential nonlinearity.
Implementations§
Source§impl ViewingConditions
impl ViewingConditions
Sourcepub fn make(
white_point: [f64; 3],
adapting_luminance: f64,
background_lstar: f64,
surround: f64,
discounting_illuminant: bool,
) -> Self
pub fn make( white_point: [f64; 3], adapting_luminance: f64, background_lstar: f64, surround: f64, discounting_illuminant: bool, ) -> Self
Conditions from physical parameters: the white point in XYZ, the adapting luminance, the L* of the surrounding area, the surround (0 dark, 1 dim, 2 average) and whether the eye discounts the illuminant.
Trait Implementations§
Source§impl Clone for ViewingConditions
impl Clone for ViewingConditions
Source§fn clone(&self) -> ViewingConditions
fn clone(&self) -> ViewingConditions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ViewingConditions
Source§impl Debug for ViewingConditions
impl Debug for ViewingConditions
Source§impl PartialEq for ViewingConditions
impl PartialEq for ViewingConditions
impl StructuralPartialEq for ViewingConditions
Auto Trait Implementations§
impl Freeze for ViewingConditions
impl RefUnwindSafe for ViewingConditions
impl Send for ViewingConditions
impl Sync for ViewingConditions
impl Unpin for ViewingConditions
impl UnsafeUnpin for ViewingConditions
impl UnwindSafe for ViewingConditions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more