qualpal::colors::HSL
C++ · cpp · 4.1.0
HSL (Hue, Saturation, Lightness) color representation.
Represents a color in the HSL color space:
Hue: [0, 360) degrees (0 = red, 120 = green, 240 = blue)
Saturation: [0, 1] (0 = gray, 1 = fully saturated)
Lightness: [0, 1] (0 = black, 1 = white)
Provides conversion constructors for RGB, XYZ, Lab, and LCHab color spaces.
HSL ; // Pure orange
HSL ; // Medium gray
HSL ;See also
RGB, XYZ, Lab, LCHab for conversions.
Methods
HSL
HSL
Source: include/qualpal/colors.h
Default constructor initializes HSL to black (0,0,0).
HSL
Source: include/qualpal/colors.h
Construct HSL from LCHab color.
Parameters
lch
LCHab color to convert from
HSL
Source: include/qualpal/colors.h
Parameters
lab
Lab color to convert from
HSL
Source: include/qualpal/colors.h
Parameters
rgb
RGB color to convert from
HSL
Source: include/qualpal/colors.h
Parameters
xyz
XYZ color to convert from
HSL
Source: include/qualpal/colors.h
Construct HSL from component values.
Parameters
h
Hue in degrees [0,360)
s
Saturation [0,1]
l
Lightness [0,1]
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,1].
operator!=
Source: include/qualpal/colors.h
inline bool Inequality operator for HSL colors.
Parameters
other
Other HSL color to compare with
Returns
true if HSL colors are not equal, false otherwise
operator==
Source: include/qualpal/colors.h
inline bool Equality operator for HSL colors.
Parameters
other
Other HSL color to compare with
Returns
true if both HSL colors are equal, false otherwise
s
Source: include/qualpal/colors.h
inline double Get saturation [0,1].
