Bugfix color escape sequence

This commit is contained in:
Bruce Hill 2025-02-28 01:23:08 -05:00
parent c888933241
commit 4041bdc236

View File

@ -88,11 +88,11 @@ int main(int argc, char **argv) {
if (i + 1 >= argc) goto usage;
int r,g,b;
if (gethexrgb(argv[++i], &r, &g, &b) != 3) goto usage;
sprintf(alive_color, "\033[48;2;%d;%d;%d;m", r,g,b);
sprintf(alive_color, "\033[48;2;%d;%d;%dm", r,g,b);
} else if (strcmp(argv[i], "-D") == 0) {
int r,g,b;
if (gethexrgb(argv[++i], &r, &g, &b) != 3) goto usage;
sprintf(dead_color, "\033[48;2;%d;%d;%d;m", r,g,b);
sprintf(dead_color, "\033[48;2;%d;%d;%dm", r,g,b);
} else {
goto usage;
}