Skip to content

Color

#include <Style.hpp>

Represents an RGB color with optional transparency.

Colors are 24-bit RGB, allowing any of 16 million colors. Can also be marked as transparent to use the terminal’s default background.

ReturnNameDescription
uint8_trRed channel (0-255)
uint8_tgGreen channel (0-255)
uint8_tbBlue channel (0-255)
booltransparentIf true, this color uses the terminal’s default.

uint8_t r = 255

Red channel (0-255)


uint8_t g = 255

Green channel (0-255)


uint8_t b = 255

Blue channel (0-255)


bool transparent = false

If true, this color uses the terminal’s default.

ReturnNameDescription
Colorclear static inlineCreates a transparent color that uses the terminal’s default.

static inline

static inline Color clear()

Creates a transparent color that uses the terminal’s default.

A transparent Color