Small fixes

This commit is contained in:
Bob Polis 2024-01-18 19:52:14 +01:00
parent 204585283c
commit 79754385c5

View File

@ -122,13 +122,13 @@ void show_truecolor(const sc::term& t) {
// check for true color support // check for true color support
char* support = getenv("COLORTERM"); char* support = getenv("COLORTERM");
if (!support || support[0] == '\0') { if (!support || support[0] == '\0') {
std::cerr << "no true color support\n"; std::cerr << "this terminal has no true color support\n";
return; return;
} }
const char* lhb = u8"\u2584"; // lower half block const char* lhb = u8"\u2584"; // lower half block
const double sat = 1.0; const double sat = 1.0;
for (double bri = 0; bri < 1; bri += 0.2) { for (double bri = 0; bri < 1; bri += 0.2) {
for (double hue = 0; hue < 360; hue += 360.0 / t.cols()) { for (double hue = 0; hue < 359; hue += 360.0 / t.cols()) {
HSB hsbb = {hue, sat, bri}; HSB hsbb = {hue, sat, bri};
Color bg {hsbb}; Color bg {hsbb};
RGB rgbb = RGB(bg); RGB rgbb = RGB(bg);