# ColorValueConverter Class

> This class contains methods used to convert sets of values from one Colorspace to another.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorValueConverter
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class ColorValueConverter
```

**Namespace:** `datalogics_interface`

## Description

This class contains methods used to convert sets of values from one Colorspace to another.

**Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)

## Constructors

### ColorValueConverter

```cpp
datalogics_interface::ColorValueConverter::ColorValueConverter()=default
```

*constructor*

Default constructor.

## Methods

### convert_values

```cpp
std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(ColorProfile source_profile, ColorProfile destination_profile, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const
```

**Parameters**

- `source_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for input values.
- `destination_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for output values.
- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion.
- `num_input_sets` (`uint32_t`): The number of sets of input values to be converted.
- `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2.

**Returns:** `std::vector< uint8_t >`

A list of converted color values in the destination colorspace.

Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent.

### convert_values

```cpp
std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(ColorProfile source_profile, const std::string &destination_profile_path, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const
```

**Parameters**

- `source_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for input values.
- `destination_profile_path` (`const std::string &`): The Color Profile to be used for output values.
- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion.
- `num_input_sets` (`uint32_t`): The number of sets of input values to be converted.
- `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2.

**Returns:** `std::vector< uint8_t >`

A list of converted color values in the destination colorspace.

Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent.

### convert_values

```cpp
std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(const std::string &source_profile_path, ColorProfile destination_profile, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const
```

**Parameters**

- `source_profile_path` (`const std::string &`): The Color Profile to be used for input values.
- `destination_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for output values.
- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion.
- `num_input_sets` (`uint32_t`): The number of sets of input values to be converted.
- `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2.

**Returns:** `std::vector< uint8_t >`

A list of converted color values in the destination colorspace.

Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent.

### convert_values

```cpp
std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(const std::string &source_profile_path, const std::string &destination_profile_path, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const
```

**Parameters**

- `source_profile_path` (`const std::string &`): The Color Profile to be used for input values.
- `destination_profile_path` (`const std::string &`): The Color Profile to be used for output values.
- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion.
- `num_input_sets` (`uint32_t`): The number of sets of input values to be converted.
- `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2.

**Returns:** `std::vector< uint8_t >`

A list of converted color values in the destination colorspace.

Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent.
