aest 0.1.0
Collection of C++ utility libraries
Loading...
Searching...
No Matches
aest::colors::Lightness< OKLab > Struct Reference

Lightness of OKLab, the perceived lightness, 1 being D65 white. More...

Static Public Member Functions

static constexpr float get (const OKLab &color) noexcept
 Get the lightness of color.
static constexpr OKLab set (const OKLab &color, const float lightness, const float end)
 Copy color with a new lightness, on the straight line toward white or black.

Detailed Description

Lightness of OKLab, the perceived lightness, 1 being D65 white.

Definition at line 669 of file Operations.cppm.

Member Function Documentation

◆ get()

constexpr float aest::colors::Lightness< OKLab >::get ( const OKLab & color)
inlinestaticconstexprnoexcept

Get the lightness of color.

Parameters
[in]colorThe color to read
Returns
The perceived lightness.

Definition at line 676 of file Operations.cppm.

◆ set()

constexpr OKLab aest::colors::Lightness< OKLab >::set ( const OKLab & color,
const float lightness,
const float end )
inlinestaticconstexpr

Copy color with a new lightness, on the straight line toward white or black.

Parameters
[in]colorThe color to copy
[in]lightnessThe new perceived lightness
[in]endThe lightness the color moves toward: 1 for white, 0 for black
Returns
The color with a and b scaled by the same fraction as the distance to end, so the hue is kept and end is gray.

Definition at line 687 of file Operations.cppm.


The documentation for this struct was generated from the following file: