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:
Paul Beckingham 2009-10-10 10:55:48 -04:00
parent 80a3196097
commit d7bded0d73
2 changed files with 27 additions and 35 deletions

View file

@ -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 ();