Qualpal
Repositories

qualpal::metrics::CIEDE2000

C++ · cpp · 4.1.0

class qualpal::metrics::CIEDE2000

CIEDE2000 (Delta E 2000) color difference metric.

Computes the perceptual color difference between two colors using the CIEDE2000 formula, the most accurate standard for perceptual color difference. Allows optional weighting factors for lightness, chroma, and hue.

While most accurate, this is also the most computationally intensive of the metrics.

Template parameters

ColorType1, ColorType2

Any color type convertible to colors::Lab.

Parameters

K_L

Lightness weighting factor (default: 1.0).

K_C

Chroma weighting factor (default: 1.0).

K_H

Hue weighting factor (default: 1.0).

See also

qualpal::colors::Lab

Methods

CIEDE2000

explicit inline CIEDE2000(double K_L = 1.0, double K_C = 1.0, double K_H = 1.0)

Construct CIEDE2000 metric with optional weighting factors.

Parameters

K_L

Lightness weighting factor (default: 1.0)

K_C

Chroma weighting factor (default: 1.0)

K_H

Hue weighting factor (default: 1.0)

operator()

template<typename ColorType1, typename ColorType2> inline double operator()(const ColorType1 & c1, const ColorType2 & c2) const

Calculate CIEDE2000 color difference.

Template parameters

ColorType1

Any color class that can be converted to colors::Lab

ColorType2

Any color class that can be converted to colors::Lab

Parameters

c1

First color

c2

Second color

Returns

CIEDE2000 Delta E value