diff options
Diffstat (limited to 'src/core/frontend/Terminal.cpp')
-rw-r--r-- | src/core/frontend/Terminal.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/frontend/Terminal.cpp b/src/core/frontend/Terminal.cpp index 5664564..c0b5250 100644 --- a/src/core/frontend/Terminal.cpp +++ b/src/core/frontend/Terminal.cpp @@ -36,6 +36,17 @@ std::string Terminal::color(int color, bool bright) const return ss.str(); } +std::string Terminal::background(int color) const +{ + if (!useColor) { + return std::string{}; + } + std::stringstream ss; + ss << "\x1b["; + ss << (color + 10) << "m"; + return ss.str(); +} + std::string Terminal::bright() const { if (!useColor) { |