pub struct ICtCp {
pub i: f32,
pub ct: f32,
pub cp: f32,
}
Fields§
§i: f32
Lightness
ct: f32
Tritan
cp: f32
Protan
Implementations§
Source§impl ICtCp
impl ICtCp
pub const fn new(i: f32, ct: f32, cp: f32) -> ICtCp
Sourcepub fn from_linear_rgb(rgb: Rgb<f32>, matrix: Matrix3f) -> ICtCp
pub fn from_linear_rgb(rgb: Rgb<f32>, matrix: Matrix3f) -> ICtCp
Converts to ICtCp from linear light Rgb
Precompute forward matrix by ICtCp::prepare_to_lms. D65 white point is assumed.
Sourcepub fn to_linear_rgb(&self, matrix: Matrix3f) -> Rgb<f32>
pub fn to_linear_rgb(&self, matrix: Matrix3f) -> Rgb<f32>
Precompute forward matrix by ICtCp::prepare_to_lms and then inverse it
Sourcepub const fn prepare_to_lms(rgb_to_xyz: Matrix3f) -> Matrix3f
pub const fn prepare_to_lms(rgb_to_xyz: Matrix3f) -> Matrix3f
Prepares RGB->LMS matrix
Trait Implementations§
Source§impl PartialOrd for ICtCp
impl PartialOrd for ICtCp
impl Copy for ICtCp
impl StructuralPartialEq for ICtCp
Auto Trait Implementations§
impl Freeze for ICtCp
impl RefUnwindSafe for ICtCp
impl Send for ICtCp
impl Sync for ICtCp
impl Unpin for ICtCp
impl UnwindSafe for ICtCp
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