NTB++
NTB++ is a cross-platform header-only utility library for C++ >= 17
Loading...
Searching...
No Matches
Enumerations | Functions
Ntb::Colors Namespace Reference

Enumerations

enum  Colors : const UInt {
  RESET = 0 , BLACK = 30 , RED , GREEN ,
  YELLOW , BLUE , MAGENTA , CYAN ,
  WHITE
}
 

Functions

const String col (const UInt color=Colors::RESET)
 
auto col (const String str, const UInt front, UInt back=Colors::RESET)
 

Enumeration Type Documentation

◆ Colors

enum Ntb::Colors::Colors : const UInt
Enumerator
RESET 
BLACK 
RED 
GREEN 
YELLOW 
BLUE 
MAGENTA 
CYAN 
WHITE 

Function Documentation

◆ col() [1/2]

auto Ntb::Colors::col ( const String  str,
const UInt  front,
UInt  back = Colors::RESET 
)
inline

Color marker for foreground, background and text.

Parameters
strThe input text.
frontThe foreground color code.
backThe background color code.
Returns
Encapsulated string with color markers.

◆ col() [2/2]

const String Ntb::Colors::col ( const UInt  color = Colors::RESET)
inline

Color marker for foreground/background.

Parameters
colorThe color code.
Returns
String with color marker.