Struct colorutils_rs::Jzczhz
source · pub struct Jzczhz {
pub jz: f32,
pub cz: f32,
pub hz: f32,
}Expand description
Represents Jzazbz in polar coordinates as Jzczhz
Fields§
§jz: f32Jz(lightness) generally expects to be between [0;1]
cz: f32Cz generally expects to be between [-1;1]
hz: f32Hz generally expects to be between [-1;1]
Implementations§
source§impl Jzczhz
impl Jzczhz
sourcepub fn from_rgb(rgb: Rgb<u8>, transfer_function: TransferFunction) -> Jzczhz
pub fn from_rgb(rgb: Rgb<u8>, transfer_function: TransferFunction) -> Jzczhz
Converts Rgb to polar coordinates Jzczhz
§Arguments
transfer_function - Transfer function to convert into linear colorspace and backwards
sourcepub fn from_rgb_with_luminance(
rgb: Rgb<u8>,
display_luminance: f32,
transfer_function: TransferFunction,
) -> Jzczhz
pub fn from_rgb_with_luminance( rgb: Rgb<u8>, display_luminance: f32, transfer_function: TransferFunction, ) -> Jzczhz
Converts Rgb to polar coordinates Jzczhz
§Arguments
display_luminance - display luminance
transfer_function - Transfer function to convert into linear colorspace and backwards
sourcepub fn from_jzazbz(jzazbz: Jzazbz) -> Jzczhz
pub fn from_jzazbz(jzazbz: Jzazbz) -> Jzczhz
Converts Jzazbz to polar coordinates Jzczhz
sourcepub fn to_jzazbz_with_luminance(&self, display_luminance: f32) -> Jzazbz
pub fn to_jzazbz_with_luminance(&self, display_luminance: f32) -> Jzazbz
Converts Jzczhz into Jzazbz
sourcepub fn to_rgb(&self, transfer_function: TransferFunction) -> Rgb<u8>
pub fn to_rgb(&self, transfer_function: TransferFunction) -> Rgb<u8>
Converts Jzczhz to Rgb
§Arguments
transfer_function - Transfer function to convert into linear colorspace and backwards
sourcepub fn to_rgb_with_luminance(
&self,
display_luminance: f32,
transfer_function: TransferFunction,
) -> Rgb<u8>
pub fn to_rgb_with_luminance( &self, display_luminance: f32, transfer_function: TransferFunction, ) -> Rgb<u8>
Converts Jzczhz to Rgb
§Arguments
display_luminance - display luminance
transfer_function - Transfer function to convert into linear colorspace and backwards
Trait Implementations§
source§impl EuclideanDistance for Jzczhz
impl EuclideanDistance for Jzczhz
fn euclidean_distance(&self, other: Self) -> f32
source§impl PartialOrd for Jzczhz
impl PartialOrd for Jzczhz
impl Copy for Jzczhz
impl StructuralPartialEq for Jzczhz
Auto Trait Implementations§
impl Freeze for Jzczhz
impl RefUnwindSafe for Jzczhz
impl Send for Jzczhz
impl Sync for Jzczhz
impl Unpin for Jzczhz
impl UnwindSafe for Jzczhz
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)