Crate oklab

Source
Expand description

Structs§

Oklab
A color in Oklab is represented with three coordinates, similar to how CIELAB works, but with better perceptual properties.
Rgb
Interoperable with the rgb crate. A Red + Green + Blue pixel.

Functions§

linear_srgb_to_oklab
Converts from linearized sRGB (in 0..1 range) to Oklab
oklab_to_linear_srgb
Converts Oklab to linear sRGB (in 0..1 range)
oklab_to_srgb
Converts Oklab to regular 8-bit sRGB color rgb
oklab_to_srgb_f32
Converts Oklab to standard sRGB color as a float in range 0..=1
srgb_f32_to_oklab
Converts sRGB as a float in range 0..=1 to Oklab (in usual Oklab range where a,b can be negative and below 1)
srgb_to_oklab
Converts regular 8-bit sRGB color to Oklab rgb

Type Aliases§

LinearRgb
Linearized sRGB (AKA linear light RGB, sRGB with gamma 1.0)