Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
sham::term::colors_24b Namespace Reference

24-bit RGB truecolor escape sequences (\x1b[38;2;r;g;bm / \x1b[48;2;r;g;bm). More...

Functions

std::string foreground (std::uint8_t r, std::uint8_t g, std::uint8_t b)
 Escape sequence to set the given RGB foreground text color.
std::string background (std::uint8_t r, std::uint8_t g, std::uint8_t b)
 Escape sequence to set the given RGB background color.

Detailed Description

24-bit RGB truecolor escape sequences (\x1b[38;2;r;g;bm / \x1b[48;2;r;g;bm).

These are only emitted if colors are enabled (see enable_colors/disable_colors) and color_level() is at least ColorLevel::TrueColor; otherwise an empty string is returned.

Function Documentation

◆ background()

std::string sham::term::colors_24b::background ( std::uint8_t r,
std::uint8_t g,
std::uint8_t b )

Escape sequence to set the given RGB background color.

Definition at line 111 of file color.cpp.

◆ foreground()

std::string sham::term::colors_24b::foreground ( std::uint8_t r,
std::uint8_t g,
std::uint8_t b )

Escape sequence to set the given RGB foreground text color.

Definition at line 108 of file color.cpp.