From 5bb2d7268cb2b4601ab1ab2d3b2619dc7a3c043f Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sun, 12 Dec 2021 14:17:15 +0100 Subject: [PATCH] Fixed typo which caused wrong colors --- src/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index 512c842..1aa961e 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -189,7 +189,7 @@ void term::rgb(int r, int g, int b, int code) const { if (r < 0 || r > 5 || g < 0 || g > 5 || b < 0 || b > 5) { throw std::invalid_argument("rgb color component out of range"); } - *_out << "\x1b[" << code << ";5;" << (16 + 36 * r + 7 * g + b) << "m"; + *_out << "\x1b[" << code << ";5;" << (16 + 36 * r + 6 * g + b) << "m"; } // ------------------------------------------------------------------------