termstyle 1.0.0-pre.3
An open-source C++ header file that enables developers to easily define and apply customizable style presets for terminal outputs such as warnings, infos, and errors.
Loading...
Searching...
No Matches
Col256

Classes

struct  termstyle::Col256
 Struct for storing 256-color codes. More...
 

Functions

bool termstyle::validateColorID (int ID)
 Validates a color 256 ID.
 
std::string termstyle::col256_2string (std::vector< Col256 > codelist) noexcept
 
std::string termstyle::col256_2string (const Col256 &col) noexcept
 

Detailed Description

Contents related to Col256.

Function Documentation

◆ col256_2string() [1/2]

std::string termstyle::col256_2string ( const Col256 & col)
noexcept

Converts a Col256 object to a string representation.

Parameters
colThe Col256 object to convert.
Returns
The string representation of the Col256 object.

◆ col256_2string() [2/2]

std::string termstyle::col256_2string ( std::vector< Col256 > codelist)
noexcept

Converts a vector of Col256 objects to a string representation.

Parameters
codelistThe vector of Col256 objects to convert.
Returns
A string representation of the Col256 objects.

◆ validateColorID()

bool termstyle::validateColorID ( int ID)

Validates a color 256 ID.

This function takes an integer color ID as input and validates it. It returns true if the color ID is valid, and false otherwise.

Parameters
IDThe color ID to be validated.
Returns
True if the color ID is valid, false otherwise.