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

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

Static Public Member Functions

static constexpr float get (const OKLCH &color) noexcept
 Get the lightness of color.
static constexpr OKLCH set (const OKLCH &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 OKLCH, the perceived lightness, 1 being D65 white.

Definition at line 696 of file Operations.cppm.

Member Function Documentation

◆ get()

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

Get the lightness of color.

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

Definition at line 703 of file Operations.cppm.

◆ set()

constexpr OKLCH aest::colors::Lightness< OKLCH >::set ( const OKLCH & 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 its chroma scaled by the same fraction as the distance to end, the same hue and alpha: end is gray.

Definition at line 714 of file Operations.cppm.


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