Skip to main content

Crate colr_types

Crate colr_types 

Source
Expand description

Color model ZSTs, marker traits, and type aliases for colr.

Re-exports§

pub use model::LCh;
pub use model::Lab;
pub use model::Oklab;
pub use model::Oklch;
pub use model::Xyz;

Modules§

chromatic_adaptation
Chromatic adaptation transforms XYZ tristimulus values from one illuminant to another.
decode
Signal decoding (EOTF): encoded signal to linear light.
device
Device-dependent color conversion trait.
encode
Signal encoding from linear light to a stored signal value.
illuminant
CIE standard illuminants and reference white points.
layout
Channel layout types for RGB, luma, and YCbCr color models.
math
Compile-time matrix arithmetic (Mat3) and floating-point math abstraction (Float).
model
Color model type definitions.
observer
Standard colorimetric observers.
primaries
RGB primary sets.
tonemap
Display Rendering Transforms, also known as tone mapping operators. The latter was chosen for simplicity.
transfer
Transfer functions.

Structs§

Premultiplied
Color channels have been multiplied by alpha.
Straight
Alpha channel is independent of the color channels.

Traits§

AlphaState
Marks how the alpha channel relates to the color channels.
BackingStore
A marker trait which implies S can act as storage for a model.
ChannelMap
Maps all N channels to their storage indices.

Type Aliases§

Aces2065
ACES 2065-1 archival space, linear AP0 under the ACES white point. Layout defaults to Rgba.
AcesCc
ACEScc logarithmic encoding of AP1. Layout defaults to Rgba.
AcesCct
ACEScct quasi-logarithmic encoding of AP1. Layout defaults to Rgba.
AcesCg
ACEScg working space, linear AP1 under the ACES white point. Layout defaults to Rgba.
DciP3
DCI-P3 for theatrical projection. Layout defaults to Rgba.
DisplayP3
Display P3 with sRGB transfer function. Layout defaults to Rgba.
Hdr10
Rec. 2020 with PQ transfer function for HDR10. Layout defaults to Rgba.
Hlg
Rec. 2020 with HLG transfer function. Layout defaults to Rgba.
LinearP3
Linear-light Display P3. Layout defaults to Rgba.
LinearProPhoto
Linear-light ProPhoto. Layout defaults to Rgba.
LinearRec2020
Linear-light Rec. 2020. Layout defaults to Rgba.
LinearSrgb
Linear-light sRGB. Layout defaults to Rgba.
ProPhoto
ProPhoto ROMM RGB. Layout defaults to Rgba.
Rec709
Rec. 709 color space per ITU-R BT.709-6. Layout defaults to Rgba.
Srgb
sRGB color space per IEC 61966-2-1:1999. Layout defaults to Rgba.