diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-13 14:22:53 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-13 14:23:10 -0700 |
commit | 52d8fb301c5107c448936efda650044c5d27605a (patch) | |
tree | 9f5bf68157f9dda0ba14f3e5f9eba5a334aff36d /color.cpp | |
parent | dfe159e7192748bb03b0b58ef67f0a999c2bec82 (diff) |
Added term256 support to set_color tool
Diffstat (limited to 'color.cpp')
-rw-r--r-- | color.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -223,7 +223,7 @@ unsigned char rgb_color_t::to_name_index() const { } } -rgb_color_t::rgb_color_t(const wcstring &str) { +void rgb_color_t::parse(const wcstring &str) { bool success = false; if (! success) success = try_parse_special(str); if (! success) success = try_parse_named(str); @@ -245,6 +245,14 @@ rgb_color_t::rgb_color_t(const wcstring &str) { } } +rgb_color_t::rgb_color_t(const wcstring &str) { + this->parse(str); +} + +rgb_color_t::rgb_color_t(const std::string &str) { + this->parse(str2wcstring(str)); +} + wcstring rgb_color_t::description() const { switch (type) { case type_none: |