| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
Data.Colour.Ok
Description
Functions for converting Colour values to and from the Oklab space, and
convenience functions for the derived Oklch space.
See https://bottosson.github.io/posts/oklab/.
Documentation
Arguments
| :: Floating a | |
| => a | L* coordinate (lightness) |
| -> a | a* coordinate |
| -> a | b* coordinate |
| -> Colour a |
Returns the colour for given Oklab coordinates, which is a perceptually uniform colour space inspired by CIELAB but which handles blue hues more accurately.
A white point is not specified because Oklab assumes
a standard d65 daylight illuminant.
okLabView :: Floating a => Colour a -> (a, a, a) Source #
Returns the Oklab coordinates of a colour, which is a perceptually uniform colour space inspired by CIELAB but which handles blue hues more accurately.
A white point is not specified because Oklab assumes
a standard d65 daylight illuminant.
Arguments
| :: Floating a | |
| => a | L* coordinate (lightness) |
| -> a | C* coordinate (chroma) |
| -> a | h* coordinate (hue) |
| -> Colour a |
Constructs a colour from a lightness, chroma, and hue given in LCh polar coordinates correspondong to an Oklab coordinate.