pub struct Cam16 {
pub hue: f64,
pub chroma: f64,
pub j: f64,
pub q: f64,
pub m: f64,
pub s: f64,
pub jstar: f64,
pub astar: f64,
pub bstar: f64,
}Expand description
A color in CAM16, the appearance model behind HCT’s hue and chroma.
Fields§
§hue: f64Hue in degrees.
chroma: f64Chroma: colorfulness relative to white.
j: f64Lightness.
q: f64Brightness.
m: f64Colorfulness.
s: f64Saturation.
jstar: f64CAM16-UCS J coordinate.
astar: f64CAM16-UCS a coordinate.
bstar: f64CAM16-UCS b coordinate.
Implementations§
Source§impl Cam16
impl Cam16
Sourcepub fn from_xyz_in(x: f64, y: f64, z: f64, vc: &ViewingConditions) -> Self
pub fn from_xyz_in(x: f64, y: f64, z: f64, vc: &ViewingConditions) -> Self
An XYZ color seen in vc.
Sourcepub fn from_jch(j: f64, c: f64, h: f64) -> Self
pub fn from_jch(j: f64, c: f64, h: f64) -> Self
From lightness, chroma and hue in the standard viewing conditions.
Sourcepub fn from_jch_in(j: f64, c: f64, h: f64, vc: &ViewingConditions) -> Self
pub fn from_jch_in(j: f64, c: f64, h: f64, vc: &ViewingConditions) -> Self
From lightness, chroma and hue in vc.
Sourcepub fn from_ucs(jstar: f64, astar: f64, bstar: f64) -> Self
pub fn from_ucs(jstar: f64, astar: f64, bstar: f64) -> Self
From CAM16-UCS coordinates in the standard viewing conditions.
Sourcepub fn xyz_in(&self, vc: &ViewingConditions) -> [f64; 3]
pub fn xyz_in(&self, vc: &ViewingConditions) -> [f64; 3]
The XYZ coordinates of this color seen in vc.
Trait Implementations§
impl Copy for Cam16
impl StructuralPartialEq for Cam16
Auto Trait Implementations§
impl Freeze for Cam16
impl RefUnwindSafe for Cam16
impl Send for Cam16
impl Sync for Cam16
impl Unpin for Cam16
impl UnsafeUnpin for Cam16
impl UnwindSafe for Cam16
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