6 #ifndef INCLUDE_ASCII_STYLE_H_
7 #define INCLUDE_ASCII_STYLE_H_
52 decorations_.push_back(decoration);
62 for (
auto &item : val.decorations_) {
72 std::vector<Decoration> decorations_;
ANSI background color escape sequence generator.
ANSI text decoration (bold, italic, underline, etc.).
ANSI foreground color escape sequence generator.
Combines foreground, background, and text decorations into a terminal style.
Style & bg(Background bg)
Set the background color for this style.
friend std::ostream & operator<<(std::ostream &os, const Style &val)
Output the style escape sequences to an output stream. Outputs all decorations first,...
Style & AddDecoration(Decoration decoration)
Add a text decoration to this style.
Style()
Default constructor. Initializes with reset colors and no decorations.
Style & fg(Foreground fg)
Set the foreground color for this style.
ANSI terminal color and decoration classes for styled output.
Color
Standard and bright ANSI terminal colors.