qualpal 3.3.0
Loading...
Searching...
No Matches
qualpal::colors::DIN99d Class Reference

DIN99d color space representation. More...

#include <colors.h>

Public Member Functions

 DIN99d ()
 Default constructor initializes DIN99d to black (0,0,0)
 
 DIN99d (const double l, const double a, const double b)
 Construct DIN99d from component values.
 
 DIN99d (const RGB &rgb)
 Construct DIN99d from RGB color.
 
 DIN99d (const HSL &hsl)
 Construct DIN99d from HSL color.
 
 DIN99d (const Lab &lab)
 Construct DIN99d from Lab color.
 
 DIN99d (const XYZ &xyz, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
 Construct DIN99d from XYZ color.
 
bool operator== (const DIN99d &other) const
 equality operator for DIN99d colors
 
bool operator!= (const DIN99d &other) const
 inequality operator for DIN99d colors
 
double l () const
 Get lightness component.
 
double a () const
 Get green-red component.
 
double b () const
 Get blue-yellow component.
 

Detailed Description

DIN99d color space representation.

DIN99d color space representation.

Perceptually uniform color space optimized for color difference calculations, especially for small differences. Used internally by qualpal for palette generation.

  • l: Lightness [0, 100]
  • a: Green-red axis [-128, 127]
  • b: Blue-yellow axis [-128, 127]

Provides conversion constructors for RGB, HSL, Lab, and XYZ. Most conversions use the D65 reference white point by default.

See also
Lab, RGB, HSL, XYZ for conversions.

Definition at line 404 of file colors.h.

Constructor & Destructor Documentation

◆ DIN99d() [1/5]

qualpal::colors::DIN99d::DIN99d ( const double  l,
const double  a,
const double  b 
)

Construct DIN99d from component values.

Parameters
lLightness component
aGreen-red component
bBlue-yellow component

◆ DIN99d() [2/5]

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

Construct DIN99d from RGB color.

Parameters
rgbRGB color to convert from

◆ DIN99d() [3/5]

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

Construct DIN99d from HSL color.

Parameters
hslHSL color to convert from

◆ DIN99d() [4/5]

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

Construct DIN99d from Lab color.

Parameters
labLab color to convert from

◆ DIN99d() [5/5]

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

Construct DIN99d from XYZ color.

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

Member Function Documentation

◆ a()

double qualpal::colors::DIN99d::a ( ) const
inline

Get green-red component.

Definition at line 472 of file colors.h.

◆ b()

double qualpal::colors::DIN99d::b ( ) const
inline

Get blue-yellow component.

Definition at line 474 of file colors.h.

◆ l()

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

Get lightness component.

Definition at line 470 of file colors.h.

◆ operator!=()

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

inequality operator for DIN99d colors

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

Definition at line 467 of file colors.h.

◆ operator==()

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

equality operator for DIN99d colors

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

Definition at line 456 of file colors.h.


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