# ColorConvertActions Class

> Class that defines color conversion actions for an object described by certain attributes.

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

```cpp
class ColorConvertActions
```

**Namespace:** `datalogics_interface`

## Description

Class that defines color conversion actions for an object described by certain attributes.

**Referenced by:** [`ColorConvertParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)

**Uses types:** [`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md), [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md), [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md), [`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

### ColorConvertActions

```cpp
datalogics_interface::ColorConvertActions::ColorConvertActions()
```

*constructor*

Default constructor for the ColorConvertActions class. Sets default values to the members.

### ColorConvertActions

```cpp
datalogics_interface::ColorConvertActions::ColorConvertActions(ColorConvertActions &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`ColorConvertActions &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md))

### ColorConvertActions

```cpp
datalogics_interface::ColorConvertActions::ColorConvertActions(const ColorConvertActions &other)
```

*constructor*

**Parameters**

- `other` ([`const ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md))

Copy constructor.

### ~ColorConvertActions

```cpp
datalogics_interface::ColorConvertActions::~ColorConvertActions()
```

*destructor*

## Methods

### get_action

```cpp
ColorConvertActionType datalogics_interface::ColorConvertActions::get_action() const
```

**Returns:** [`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md)

Gets / sets the action, specifying what to do when an object matches this Settings record.

### get_colorant_name

```cpp
std::string datalogics_interface::ColorConvertActions::get_colorant_name() const
```

**Returns:** `std::string`

For ink actions (which describe a single colorant, whether used in Separation or DeviceN, and which are not matched using the above matching fields) this describes the colorant of the ink.

### get_convert_intent

```cpp
RenderIntent datalogics_interface::ColorConvertActions::get_convert_intent() const
```

**Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)

Gets / sets the intent that overrides the object's original render intent when performing color conversion. UseProfileIntent means that the intent of the object must not be overridden.

### get_convert_profile

```cpp
ColorProfile datalogics_interface::ColorConvertActions::get_convert_profile() const
```

**Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)

Gets / sets the target ColorProfile for the conversion. If the output intent is embedded, this should be the output intent profile.

### get_convert_profile_path

```cpp
std::string datalogics_interface::ColorConvertActions::get_convert_profile_path() const
```

**Returns:** `std::string`

Gets / sets the target ColorProfile for the conversion using the profile found at the path provided. If the output intent is embedded, this should be the output intent profile. NOTE: If specifying a path, ConvertProfile must be set to Null_ColorProfile.

### get_embed_color_profile

```cpp
bool datalogics_interface::ColorConvertActions::get_embed_color_profile() const
```

**Returns:** `bool`

If true, embed the target profile. If false, the resulting color is Device, if possible.

### get_intent_to_match

```cpp
RenderIntent datalogics_interface::ColorConvertActions::get_intent_to_match() const
```

**Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)

Gets / sets the rendering intent of the object. If this is UseProfileIntent this action applies to any intent.

### get_is_ink_action

```cpp
bool datalogics_interface::ColorConvertActions::get_is_ink_action() const
```

**Returns:** `bool`

Marks this Action to be applied to inks.

### get_must_match_all_attrs

```cpp
ColorConvertObjAttrs datalogics_interface::ColorConvertActions::get_must_match_all_attrs() const
```

**Returns:** [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)

A bit field that gets / sets the attributes an element must match to be color converted. The element must match ALL these attributes to be color converted.

### get_must_match_all_cs_attrs

```cpp
ColorConvertSpaceType datalogics_interface::ColorConvertActions::get_must_match_all_cs_attrs() const
```

**Returns:** [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)

A bit field that gets / sets the Color Space attributes an object must match to be color converted. The element must match ALL these Color Space attributes to be color converted.

### get_must_match_any_attrs

```cpp
ColorConvertObjAttrs datalogics_interface::ColorConvertActions::get_must_match_any_attrs() const
```

**Returns:** [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)

A bit field that gets / sets the attributes an element must match to be color converted. The element can match ONE OR MORE of these attributes to be color converted.

### get_must_match_any_cs_attrs

```cpp
ColorConvertSpaceType datalogics_interface::ColorConvertActions::get_must_match_any_cs_attrs() const
```

**Returns:** [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)

A bit field that gets / sets the Color Space attributes an object must match to be color converted. The element can match ONE OR MORE Color Space attributes to be color converted.

### get_preserve_black

```cpp
bool datalogics_interface::ColorConvertActions::get_preserve_black() const
```

**Returns:** `bool`

If true, perform a black-preserving transform when converting.

### get_use_black_point_compensation

```cpp
bool datalogics_interface::ColorConvertActions::get_use_black_point_compensation() const
```

**Returns:** `bool`

If true, turn on black point compensation for color conversions.

### operator=

```cpp
ColorConvertActions & datalogics_interface::ColorConvertActions::operator=(ColorConvertActions &&) noexcept
```

**Parameters**

- (unnamed) ([`ColorConvertActions &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md))

**Returns:** [`ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)

### operator=

```cpp
ColorConvertActions & datalogics_interface::ColorConvertActions::operator=(const ColorConvertActions &other)
```

**Parameters**

- `other` ([`const ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md))

**Returns:** [`ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)

Copy assignment.

### set_action

```cpp
void datalogics_interface::ColorConvertActions::set_action(ColorConvertActionType action)
```

**Parameters**

- `action` ([`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md)): the action to apply when an object matches this Settings record.

**Returns:** `void`

### set_colorant_name

```cpp
void datalogics_interface::ColorConvertActions::set_colorant_name(const std::string &name)
```

**Parameters**

- `name` (`const std::string &`): the colorant name (used for ink actions that describe a single colorant).

**Returns:** `void`

### set_convert_intent

```cpp
void datalogics_interface::ColorConvertActions::set_convert_intent(RenderIntent intent)
```

**Parameters**

- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): the render intent that overrides the object's original render intent during color conversion. UseProfileIntent leaves the original intent in place.

**Returns:** `void`

### set_convert_profile

```cpp
void datalogics_interface::ColorConvertActions::set_convert_profile(ColorProfile profile)
```

**Parameters**

- `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): the target ColorProfile for the conversion; if the output intent is embedded, this should be the output intent profile.

**Returns:** `void`

### set_convert_profile_path

```cpp
void datalogics_interface::ColorConvertActions::set_convert_profile_path(const std::string &path)
```

**Parameters**

- `path` (`const std::string &`): the path to the target ColorProfile for the conversion. ConvertProfile must be set to Null_ColorProfile when using a path.

**Returns:** `void`

### set_embed_color_profile

```cpp
void datalogics_interface::ColorConvertActions::set_embed_color_profile(bool embed)
```

**Parameters**

- `embed` (`bool`): true to embed the target profile; false to leave the resulting color as Device when possible.

**Returns:** `void`

### set_intent_to_match

```cpp
void datalogics_interface::ColorConvertActions::set_intent_to_match(RenderIntent intent)
```

**Parameters**

- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): the rendering intent to match; UseProfileIntent matches any intent.

**Returns:** `void`

### set_is_ink_action

```cpp
void datalogics_interface::ColorConvertActions::set_is_ink_action(bool is_ink)
```

**Parameters**

- `is_ink` (`bool`): true if this Action applies to inks, false otherwise.

**Returns:** `void`

### set_must_match_all_attrs

```cpp
void datalogics_interface::ColorConvertActions::set_must_match_all_attrs(ColorConvertObjAttrs attrs)
```

**Parameters**

- `attrs` ([`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)): the bit field of attributes; an element must match ALL of these to be color converted.

**Returns:** `void`

### set_must_match_all_cs_attrs

```cpp
void datalogics_interface::ColorConvertActions::set_must_match_all_cs_attrs(ColorConvertSpaceType attrs)
```

**Parameters**

- `attrs` ([`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)): the bit field of color-space attributes; an object must match ALL of these to be color converted.

**Returns:** `void`

### set_must_match_any_attrs

```cpp
void datalogics_interface::ColorConvertActions::set_must_match_any_attrs(ColorConvertObjAttrs attrs)
```

**Parameters**

- `attrs` ([`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)): the bit field of attributes; an element matching ANY of these is color converted.

**Returns:** `void`

### set_must_match_any_cs_attrs

```cpp
void datalogics_interface::ColorConvertActions::set_must_match_any_cs_attrs(ColorConvertSpaceType attrs)
```

**Parameters**

- `attrs` ([`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)): the bit field of color-space attributes; an object matching ANY of these is color converted.

**Returns:** `void`

### set_preserve_black

```cpp
void datalogics_interface::ColorConvertActions::set_preserve_black(bool preserve)
```

**Parameters**

- `preserve` (`bool`): true to perform a black-preserving transform when converting, false otherwise.

**Returns:** `void`

### set_use_black_point_compensation

```cpp
void datalogics_interface::ColorConvertActions::set_use_black_point_compensation(bool use)
```

**Parameters**

- `use` (`bool`): true to enable black point compensation for color conversions, false otherwise.

**Returns:** `void`
