Enhancement - Color::colorize
- Made Color::colorize (const std::string&, const std::string&) static,
so that it is now simple to colorize a string:
std::cout << Color::colorize ("text", "red");
- Added sample foreground and background colors to the "color" command,
and used the above shortcut to simplify handleOnColor.
This commit is contained in:
@@ -60,7 +60,7 @@ public:
|
||||
void blend (const Color&);
|
||||
|
||||
std::string colorize (const std::string&);
|
||||
std::string colorize (const std::string&, const std::string&);
|
||||
static std::string colorize (const std::string&, const std::string&);
|
||||
|
||||
bool nontrivial ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user