qualpal 2.3.0
Loading...
Searching...
No Matches
qualpal::colors::LCHab Class Reference

LCHab color space representation (CIE L*C*h) More...

#include <colors.h>

Public Member Functions

 LCHab ()
 Default constructor initializes LCHab to black (0,0,0)
 
 LCHab (const double l, const double c, const double h)
 Construct LCHab from component values.
 
 LCHab (const Lab &lab)
 Construct LCHab from Lab color.
 
 LCHab (const RGB &rgb)
 Construct LCHab from RGB color.
 
 LCHab (const HSL &hsl)
 Construct LCHab from HSL color.
 
 LCHab (const XYZ &xyz, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
 Construct LCHab from XYZ color.
 
bool operator== (const LCHab &other) const
 equality operator for LCHab colors
 
bool operator!= (const LCHab &other) const
 inequality operator for LCHab colors
 
double l () const
 Get lightness [0,100].
 
double c () const
 Get chroma [0,∞)
 
double h () const
 Get hue in degrees [0,360)
 

Detailed Description

LCHab color space representation (CIE L*C*h)

A cylindrical representation of Lab color space:

  • L: lightness [0,100]
  • C: chroma [0,∞)
  • H: hue in degrees [0,360)

Provides a more intuitive way to represent colors in Lab space.

Definition at line 514 of file colors.h.

Constructor & Destructor Documentation

◆ LCHab() [1/5]

qualpal::colors::LCHab::LCHab ( const double  l,
const double  c,
const double  h 
)

Construct LCHab from component values.

Parameters
lLightness [0,100]
cChroma [0,∞)
hHue in degrees [0,360)

◆ LCHab() [2/5]

qualpal::colors::LCHab::LCHab ( const Lab lab)

Construct LCHab from Lab color.

Parameters
labLab color to convert from

◆ LCHab() [3/5]

qualpal::colors::LCHab::LCHab ( const RGB rgb)

Construct LCHab from RGB color.

Parameters
rgbRGB color to convert from

◆ LCHab() [4/5]

qualpal::colors::LCHab::LCHab ( const HSL hsl)

Construct LCHab from HSL color.

Parameters
hslHSL color to convert from

◆ LCHab() [5/5]

qualpal::colors::LCHab::LCHab ( const XYZ xyz,
const std::array< double, 3 > &  white_point = { 0.95047, 1, 1.08883 } 
)

Construct LCHab from XYZ color.

Parameters
xyzXYZ color to convert from
white_pointReference white point (default: D65)

Member Function Documentation

◆ c()

double qualpal::colors::LCHab::c ( ) const
inline

Get chroma [0,∞)

Definition at line 581 of file colors.h.

◆ h()

double qualpal::colors::LCHab::h ( ) const
inline

Get hue in degrees [0,360)

Definition at line 583 of file colors.h.

◆ l()

double qualpal::colors::LCHab::l ( ) const
inline

Get lightness [0,100].

Definition at line 579 of file colors.h.

◆ operator!=()

bool qualpal::colors::LCHab::operator!= ( const LCHab other) const
inline

inequality operator for LCHab colors

Parameters
otherOther LCHab color to compare with
Returns
true if LCHab colors are not equal, false otherwise

Definition at line 576 of file colors.h.

◆ operator==()

bool qualpal::colors::LCHab::operator== ( const LCHab other) const
inline

equality operator for LCHab colors

Parameters
otherOther LCHab color to compare with
Returns
true if both LCHab colors are equal, false otherwise

Definition at line 565 of file colors.h.


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