# QRColor Class

> Used to control how the QR color is created.

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

```cpp
class QRColor
```

**Namespace:** `datalogics_interface`

## Description

Used to control how the QR color is created.

**Note:** This class intentionally uses inline storage rather than the pimpl pattern because it is a trivial 3-member value type with no internal APDFL object to wrap.

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

## Constructors

### QRColor

```cpp
datalogics_interface::QRColor::QRColor()
```

*constructor*

Create a new QRColor object.

### QRColor

```cpp
datalogics_interface::QRColor::QRColor(int red, int green, int blue)
```

*constructor*

**Parameters**

- `red` (`int`)
- `green` (`int`)
- `blue` (`int`)

Construct with RGB values.

## Methods

### get_blue

```cpp
int datalogics_interface::QRColor::get_blue() const
```

**Returns:** `int`

The blue component value.

Gets the blue component of the QR color.

### get_green

```cpp
int datalogics_interface::QRColor::get_green() const
```

**Returns:** `int`

The green component value.

Gets the green component of the QR color.

### get_red

```cpp
int datalogics_interface::QRColor::get_red() const
```

**Returns:** `int`

The red component value.

Gets the red component of the QR color.

### set_blue

```cpp
void datalogics_interface::QRColor::set_blue(int blue)
```

**Parameters**

- `blue` (`int`): The blue component value to set.

**Returns:** `void`

Sets the blue component of the QR color.

### set_green

```cpp
void datalogics_interface::QRColor::set_green(int green)
```

**Parameters**

- `green` (`int`): The green component value to set.

**Returns:** `void`

Sets the green component of the QR color.

### set_red

```cpp
void datalogics_interface::QRColor::set_red(int red)
```

**Parameters**

- `red` (`int`): The red component value to set.

**Returns:** `void`

Sets the red component of the QR color.
