qualpal::colors::LCHab
C++ · cpp · 4.1.0
LCHab color space representation (CIE L*C*h).
LCHab color space representation (CIE L*C*h).
Cylindrical representation of Lab color space:
L: Lightness [0, 100]
C: Chroma [0, ∞)
H: Hue in degrees [0, 360)
Useful for intuitive manipulation of color lightness, chroma, and hue. Provides conversion constructors for Lab, RGB, HSL, and XYZ. Most conversions use the D65 reference white point by default.
See also
Lab, RGB, HSL, XYZ for conversions.
Methods
LCHab
LCHab
Source: include/qualpal/colors.h
Default constructor initializes LCHab to black (0,0,0).
LCHab
Source: include/qualpal/colors.h
Construct LCHab from HSL color.
Parameters
hsl
HSL color to convert from
LCHab
Source: include/qualpal/colors.h
Construct LCHab from Lab color.
Parameters
lab
Lab color to convert from
LCHab
Source: include/qualpal/colors.h
Construct LCHab from RGB color.
Parameters
rgb
RGB color to convert from
LCHab
Source: include/qualpal/colors.h
Construct LCHab from XYZ color.
Parameters
xyz
XYZ color to convert from
white_point
Reference white point (default: D65)
LCHab
Source: include/qualpal/colors.h
Construct LCHab from component values.
Parameters
l
Lightness [0,100]
c
Chroma [0,∞)
h
Hue in degrees [0,360)
c
Source: include/qualpal/colors.h
inline double Get chroma [0,∞).
h
Source: include/qualpal/colors.h
inline double Get hue in degrees [0,360).
l
Source: include/qualpal/colors.h
inline double Get lightness [0,100].
operator!=
Source: include/qualpal/colors.h
inline bool inequality operator for LCHab colors
Parameters
other
Other LCHab color to compare with
Returns
true if LCHab colors are not equal, false otherwise
operator==
Source: include/qualpal/colors.h
inline bool equality operator for LCHab colors
Parameters
other
Other LCHab color to compare with
Returns
true if both LCHab colors are equal, false otherwise
