Qualpal
Repositories

qualpal::colors::DIN99d

C++ · cpp · 4.1.0

class qualpal::colors::DIN99d

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.

Methods

DIN99d

DIN99d

DIN99d()

Default constructor initializes DIN99d to black (0,0,0).

DIN99d

DIN99d(const HSL & hsl)

Construct DIN99d from HSL color.

Parameters

hsl

HSL color to convert from

DIN99d

DIN99d(const Lab & lab)

Construct DIN99d from Lab color.

Parameters

lab

Lab color to convert from

DIN99d

DIN99d(const RGB & rgb)

Construct DIN99d from RGB color.

Parameters

rgb

RGB color to convert from

DIN99d

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

Construct DIN99d from XYZ color.

Parameters

xyz

XYZ color to convert from

white_point

Reference white point (default: D65)

DIN99d

DIN99d(const double l, const double a, const double b)

Construct DIN99d from component values.

Parameters

l

Lightness component

a

Green-red component

b

Blue-yellow component

a

inline double a() const

Get green-red component.

b

inline double b() const

Get blue-yellow component.

l

inline double l() const

Get lightness component.

operator!=

inline bool operator!=(const DIN99d & other) const

inequality operator for DIN99d colors

Parameters

other

Other DIN99d color to compare with

Returns

true if DIN99d colors are not equal, false otherwise

operator==

inline bool operator==(const DIN99d & other) const

equality operator for DIN99d colors

Parameters

other

Other DIN99d color to compare with

Returns

true if both DIN99d colors are equal, false otherwise