Skip to content

Commit

Permalink
New pseudo color names
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg committed Dec 13, 2024
1 parent a7c5b6f commit e4488d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@
#define c_cyan_cyan all_colors.get(def_c_cyan_cyan)
#define c_light_cyan_cyan all_colors.get(def_c_light_cyan_cyan)

#define c_info all_colors.get(def_c_cyan)
#define c_stat all_colors.get(def_c_light_blue)
#define c_header all_colors.get(def_c_magenta)
#define c_bold all_colors.get(def_c_white)
#define c_dark all_colors.get(def_c_dark_gray)
#define c_good all_colors.get(def_c_green)
#define c_bad all_colors.get(def_c_red)
#define c_neutral all_colors.get(def_c_yellow)

// def_x is a color that maps to x with default settings
enum color_id {
def_c_black = 0,
Expand Down
16 changes: 8 additions & 8 deletions src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,14 +1040,14 @@ std::string string_replace( std::string text, const std::string &before, const s
std::string replace_colors( std::string text )
{
static const std::vector<std::pair<std::string, std::string>> info_colors = {
{"info", get_all_colors().get_name( c_cyan )},
{"stat", get_all_colors().get_name( c_light_blue )},
{"header", get_all_colors().get_name( c_magenta )},
{"bold", get_all_colors().get_name( c_white )},
{"dark", get_all_colors().get_name( c_dark_gray )},
{"good", get_all_colors().get_name( c_green )},
{"bad", get_all_colors().get_name( c_red )},
{"neutral", get_all_colors().get_name( c_yellow )}
{"info", get_all_colors().get_name( c_info ) },
{"stat", get_all_colors().get_name( c_stat ) },
{"header", get_all_colors().get_name( c_header ) },
{"bold", get_all_colors().get_name( c_bold ) },
{"dark", get_all_colors().get_name( c_dark ) },
{"good", get_all_colors().get_name( c_good ) },
{"bad", get_all_colors().get_name( c_bad ) },
{"neutral", get_all_colors().get_name( c_neutral ) },
};

for( const auto &elem : info_colors ) {
Expand Down

0 comments on commit e4488d9

Please sign in to comment.