Struct colstodian::DynamicColorSpace[][src]

pub struct DynamicColorSpace { /* fields omitted */ }
Expand description

A color space defined in data by its Primaries, white point, and an optional invertible transform function.

See spaces for defined color spaces.

ColorSpace assumes that a color space is one of

  • the CIE XYZ color space
  • an RGB color space
  • a color space which may be defined as an invertible mapping from one the above (TransformFn)

An example of a TransformFn is the sRGB “opto-eletronic transfer function”, or “gamma compensation”.

kolor makes the distinction between “linear” and “non-linear” color spaces, where a linear color space can be defined as a linear transformation from the CIE XYZ color space.

ColorSpace contains a reference WhitePoint to represent a color space’s reference illuminant.

A linear RGB ColorSpace can be thought of as defining a relative coordinate system in the CIE XYZ color coordinate space, where three RGB primaries each define an axis pointing from the black point (0,0,0) in CIE XYZ.

Non-linear ColorSpaces - such as sRGB with gamma compensation applied - are defined as a non-linear mapping from a linear ColorSpace’s coordinate system.

Implementations

Whether the color space has a non-linear transform applied

Creates a new color space with the primaries and white point from this, but with the provided TransformFn.

Creates a new color space with the transform function and white point from this, but with the provided WhitePoint.

Creates a new color space with the primaries and transform function from this, but with the provided RGBPrimaries.

Creates a CIE LAB color space using this space’s white point.

Creates a CIE uvV color space using this space’s white point.

Creates a CIE LCh color space using this space’s white point.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.