# qualpal::metrics::CIEDE2000

C++ · 4.1.0

[Source](<https://github.com/jolars/qualpal/blob/887b793a3795d298a62e49356a72314ce59dab0d/include/qualpal/metrics.h>)

```cpp
class qualpal::metrics::CIEDE2000
```

[CIEDE2000](<5333d0fe7760f4247a9ab5c591dde9118c40d0893b9c057884147334a8038ebd>) (Delta E 2000) color difference metric. 

Computes the perceptual color difference between two colors using the [CIEDE2000](<5333d0fe7760f4247a9ab5c591dde9118c40d0893b9c057884147334a8038ebd>) 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.

<a id="documentation-template-parameters"></a>

### Template parameters

**`ColorType1, ColorType2`**

Any color type convertible to [colors::Lab](<bc5685852e488d86b4707de1ef1d606b788c0f89d090ec8c4cf03d84d1a6defd>).

 

<a id="documentation-parameters"></a>

### 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).

 

<a id="documentation-see-also"></a>

### See also

[qualpal::colors::Lab](<bc5685852e488d86b4707de1ef1d606b788c0f89d090ec8c4cf03d84d1a6defd>) 

<a id="cpp-methods"></a>

## Methods

<a id="cpp-996e35ae76da03d537c1596e9f8c0fd27e46dc814f183fe56172f27ff44038f2"></a>

### `CIEDE2000`

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

[Source](<https://github.com/jolars/qualpal/blob/887b793a3795d298a62e49356a72314ce59dab0d/include/qualpal/metrics.h>)

Construct [CIEDE2000](<5333d0fe7760f4247a9ab5c591dde9118c40d0893b9c057884147334a8038ebd>) metric with optional weighting factors. 

<a id="cpp-996e35ae76da03d537c1596e9f8c0fd27e46dc814f183fe56172f27ff44038f2-documentation-parameters"></a>

##### 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) 

<a id="cpp-19edd432dfd27c07ceabf3193e1410ef9d5e5af52110ea16d11720ea78ed726f"></a>

### `operator()`

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

[Source](<https://github.com/jolars/qualpal/blob/887b793a3795d298a62e49356a72314ce59dab0d/include/qualpal/metrics.h>)

Calculate [CIEDE2000](<5333d0fe7760f4247a9ab5c591dde9118c40d0893b9c057884147334a8038ebd>) color difference. 

<a id="cpp-19edd432dfd27c07ceabf3193e1410ef9d5e5af52110ea16d11720ea78ed726f-documentation-template-parameters"></a>

##### Template parameters

**`ColorType1`**

Any color class that can be converted to [colors::Lab](<bc5685852e488d86b4707de1ef1d606b788c0f89d090ec8c4cf03d84d1a6defd>) 

**`ColorType2`**

Any color class that can be converted to [colors::Lab](<bc5685852e488d86b4707de1ef1d606b788c0f89d090ec8c4cf03d84d1a6defd>) 

 

<a id="cpp-19edd432dfd27c07ceabf3193e1410ef9d5e5af52110ea16d11720ea78ed726f-documentation-parameters"></a>

##### Parameters

**`c1`**

First color 

**`c2`**

Second color 

 

<a id="cpp-19edd432dfd27c07ceabf3193e1410ef9d5e5af52110ea16d11720ea78ed726f-documentation-returns"></a>

##### Returns

[CIEDE2000](<5333d0fe7760f4247a9ab5c591dde9118c40d0893b9c057884147334a8038ebd>) Delta E value
