# qualpal::metrics::DIN99d

C++ · 4.1.0

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

```cpp
class qualpal::metrics::DIN99d
```

[DIN99d](<27015d2beab2e4039b5bacc5eabfad002f7b2746b0445119676aada1f32a432d>) color difference metric with optional power transformation. 

Computes the Euclidean distance between two colors in [DIN99d](<27015d2beab2e4039b5bacc5eabfad002f7b2746b0445119676aada1f32a432d>) color space. Optionally applies a power transformation for improved perceptual uniformity.

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

### Template parameters

**`ColorType1, ColorType2`**

Any color type convertible to [colors::DIN99d](<a18b7bd442cf0552985e0348d19b68cab53705c36e10dec0d6cf914c671961d1>).

 

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

### Parameters

**`use_power_transform`**

Whether to apply power transformation (default: true). 

**`power`**

Power value for transformation (default: 0.74). 

**`scale`**

Scale factor after transformation (default: 1.28).

 

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

### See also

[qualpal::colors::DIN99d](<a18b7bd442cf0552985e0348d19b68cab53705c36e10dec0d6cf914c671961d1>) 

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

## Methods

<a id="cpp-3c10a6f98b5e2c5f6cbc600d3142d050807a185d5c63f537315ee000614b5838"></a>

### `DIN99d`

```cpp
explicit inline DIN99d(bool use_power_transform = true, double power = 0.74, double scale = 1.28)
```

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

Construct [DIN99d](<27015d2beab2e4039b5bacc5eabfad002f7b2746b0445119676aada1f32a432d>) metric with configurable parameters. 

<a id="cpp-3c10a6f98b5e2c5f6cbc600d3142d050807a185d5c63f537315ee000614b5838-documentation-parameters"></a>

##### Parameters

**`use_power_transform`**

Whether to apply power transformation (default: true) 

**`power`**

Power value for transformation (default: 0.74) 

**`scale`**

Scale factor after transformation (default: 1.28) 

<a id="cpp-0302144f6c54602f7c34f78122e7e0b08b776e23e1a341d9bb288a3cf3c4faf4"></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 color difference between two colors. 

<a id="cpp-0302144f6c54602f7c34f78122e7e0b08b776e23e1a341d9bb288a3cf3c4faf4-documentation-template-parameters"></a>

##### Template parameters

**`ColorType1`**

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

**`ColorType2`**

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

 

<a id="cpp-0302144f6c54602f7c34f78122e7e0b08b776e23e1a341d9bb288a3cf3c4faf4-documentation-parameters"></a>

##### Parameters

**`c1`**

First color 

**`c2`**

Second color 

 

<a id="cpp-0302144f6c54602f7c34f78122e7e0b08b776e23e1a341d9bb288a3cf3c4faf4-documentation-returns"></a>

##### Returns

Color difference value (Delta E in [DIN99d](<27015d2beab2e4039b5bacc5eabfad002f7b2746b0445119676aada1f32a432d>) space)
