Skip to main content

lightness

Function lightness 

Source
pub fn lightness(color: Hsla) -> f32
Expand description

The oklch lightness of an achromatic tone: neutral inverted.

Only greys round-trip through this. A grey’s three channels are equal, and the three LMS matrix rows each sum to 1, so the whole OKLab transform collapses to one cube root — no inverse matrix needed.