qualpal::colors::Lab
C++ · cpp · 4.1.0
Lab color space representation (CIE L*a*b*).
Perceptually uniform color space where Euclidean distance approximates perceived color difference.
L: Lightness [0, 100] (0 = black, 100 = white)
a: Green-red axis [-128, 127] (negative = green, positive = red)
b: Blue-yellow axis [-128, 127] (negative = blue, positive = yellow)
Provides conversion constructors for RGB, HSL, XYZ, and LCHab. Most conversions use the D65 reference white point by default.
See also
RGB, HSL, XYZ, LCHab for conversions.
Methods
Lab
Lab
Source: include/qualpal/colors.h
Default constructor initializes Lab to black (0,0,0).
Lab
Source: include/qualpal/colors.h
Parameters
hsl
HSL color to convert from
Lab
Source: include/qualpal/colors.h
Construct Lab from LCHab color.
Parameters
lch
LCHab color to convert from
Lab
Source: include/qualpal/colors.h
Parameters
rgb
RGB color to convert from
Lab
Source: include/qualpal/colors.h
Parameters
xyz
XYZ color to convert from
white_point
Reference white point (default: D65)
Lab
Source: include/qualpal/colors.h
Construct Lab from component values.
Parameters
l
Lightness [0,100]
a
Green-red axis [-128,127]
b
Blue-yellow axis [-128,127]
a
Source: include/qualpal/colors.h
inline double Get green-red component.
b
Source: include/qualpal/colors.h
inline double Get blue-yellow component.
l
Source: include/qualpal/colors.h
inline double Get lightness [0,100].
operator==
Source: include/qualpal/colors.h
inline bool Equality operator for Lab colors.
Parameters
other
Other Lab color to compare with
Returns
true if both Lab colors are equal, false otherwise
