#[repr(u8)]
pub enum TransformFn {
Show 18 variants NONE, sRGB, Oklab, Oklch, CIE_xyY, CIELAB, CIELCh, CIE_1960_UCS, CIE_1960_UCS_uvV, CIE_1964_UVW, CIE_1976_Luv, HSL, HSV, HSI, ICtCp_PQ, ICtCp_HLG, BT_601, PQ,
}
Expand description

A TransformFn identifies an invertible mapping of colors in a linear ColorSpace.

Variants§

§

NONE

§

sRGB

The sRGB transfer functions (aka “gamma correction”)

§

Oklab

Oklab conversion from xyz

§

Oklch

Oklch (Oklab’s LCh variant) conversion from xyz

§

CIE_xyY

CIE xyY transform

§

CIELAB

CIELAB transform

§

CIELCh

CIELCh transform

§

CIE_1960_UCS

CIE 1960 UCS transform

§

CIE_1960_UCS_uvV

CIE 1960 UCS transform in uvV form

§

CIE_1964_UVW

CIE 1964 UVW transform

§

CIE_1976_Luv

CIE 1976 Luv transform

§

HSL

(Hue, Saturation, Lightness), where L is defined as the average of the largest and smallest color components

§

HSV

(Hue, Saturation, Value), where V is defined as the largest component of a color

§

HSI

(Hue, Saturation, Intensity), where I is defined as the average of the three components

§

ICtCp_PQ

BT.2100 ICtCp with PQ transfer function

§

ICtCp_HLG

BT.2100 ICtCp with HLG transfer function

§

BT_601

The BT.601/BT.709/BT.2020 (they are equivalent) OETF and inverse.

§

PQ

SMPTE ST 2084:2014 aka “Perceptual Quantizer” transfer functions used in BT.2100 for digitally created/distributed HDR content.

Implementations§

source§

impl TransformFn

source

pub const ENUM_COUNT: TransformFn = TransformFn::ICtCp_HLG

Trait Implementations§

source§

impl Clone for TransformFn

source§

fn clone(&self) -> TransformFn

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransformFn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for TransformFn

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<TransformFn> for TransformFn

source§

fn eq(&self, other: &TransformFn) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for TransformFn

source§

impl Eq for TransformFn

source§

impl StructuralEq for TransformFn

source§

impl StructuralPartialEq for TransformFn

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.