Fixed typo which caused wrong colors

This commit is contained in:
Bob Polis 2021-12-12 14:17:15 +01:00
parent 97a5cd5873
commit 5bb2d7268c

View File

@ -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";
}
// ------------------------------------------------------------------------