koutil
Loading...
Searching...
No Matches
koutil::term::color_literals Namespace Reference

Functions

consteval color_t operator""_color (const char *str, std::size_t size)
 Creates a Color object from a hexadecimal string.
 
consteval color_bg_t operator""_bg (const char *str, std::size_t size)
 Creates a ColorBG object from a hexadecimal string.
 
consteval color_fg_t operator""_fg (const char *str, std::size_t size)
 Creates a ColorFG object from a hexadecimal string.
 

Function Documentation

◆ operator""_bg()

color_bg_t koutil::term::color_literals::operator""_bg ( const char * str,
std::size_t size )
consteval

Creates a ColorBG object from a hexadecimal string.

Parameters
strThe hexadecimal string.
sizeThe size of the string.
Returns
ColorBG The ColorBG object created from the hexadecimal string.

◆ operator""_color()

color_t koutil::term::color_literals::operator""_color ( const char * str,
std::size_t size )
consteval

Creates a Color object from a hexadecimal string.

Parameters
strThe hexadecimal string.
sizeThe size of the string.
Returns
Color The Color object created from the hexadecimal string.

◆ operator""_fg()

color_fg_t koutil::term::color_literals::operator""_fg ( const char * str,
std::size_t size )
consteval

Creates a ColorFG object from a hexadecimal string.

Parameters
strThe hexadecimal string.
sizeThe size of the string.
Returns
ColorFG The ColorFG object created from the hexadecimal string.