aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-07-08 17:43:26 +0000
committerterminaldweller <thabogre@gmail.com>2022-07-08 17:43:26 +0000
commit92584e2d754279504ec001362c13ad456563bfcb (patch)
tree485f8254f6d7bd4dddaf0b3c0cd1c19f190d6e1e /terms.c
parenta temp hacky fix for the colors (diff)
downloadw3m-master.tar.gz
w3m-master.zip
a temp hacky fix for the colorsHEADmaster
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/terms.c b/terms.c
index 2ece7bd..8d5f7d5 100644
--- a/terms.c
+++ b/terms.c
@@ -1706,10 +1706,12 @@ color_seq(int colmode)
sprintf(seqbuf, "\x1b[38;5;37m");
break;
case 7:
- sprintf(seqbuf, "\x1b[38;5;122m");
+ // WHITE
+ sprintf(seqbuf, "\x1b[38;5;23m");
break;
default:
- sprintf(seqbuf, "\033[%dm", ((colmode >> 8) & 7) + 30);
+ sprintf(seqbuf, "\x1b[38;5;23m");
+ /* sprintf(seqbuf, "\033[%dm", ((colmode >> 8) & 7) + 30); */
}
/* if (color == 1) { */
/* sprintf(seqbuf, "\x1b[38;5;23m"); */
@@ -1734,7 +1736,40 @@ bcolor_seq(int colmode)
{
static char seqbuf[32];
/* sprintf(seqbuf, "\033[%dm", ((colmode >> 12) & 7) + 40); */
- sprintf(seqbuf, "\x1b[38;5;%dm", ((colmode >> 12) & 7) + 40);
+ int color = ((colmode >> 12) & 7);
+ switch(color) {
+ case 1:
+ // WHITE
+ sprintf(seqbuf, "\x1b[38;5;23m");
+ break;
+ case 2:
+ // RED
+ sprintf(seqbuf, "\x1b[38;5;203m");
+ break;
+ case 3:
+ // GREEN
+ sprintf(seqbuf, "\x1b[38;5;28m");
+ break;
+ case 4:
+ // BLUE
+ sprintf(seqbuf, "\x1b[38;5;33m");
+ break;
+ case 5:
+ //
+ sprintf(seqbuf, "\x1b[38;5;62m");
+ break;
+ case 6:
+ // CYAN
+ sprintf(seqbuf, "\x1b[38;5;37m");
+ break;
+ case 7:
+ sprintf(seqbuf, "\x1b[38;5;122m");
+ break;
+ default:
+ sprintf(seqbuf, "\x1b[38;5;23m");
+ /* sprintf(seqbuf, "\033[%dm", ((colmode >> 8) & 7) + 30); */
+ }
+ /* sprintf(seqbuf, "\x1b[38;5;%dm", ((colmode >> 12) & 7) + 40); */
return seqbuf;
}
#endif /* USE_BG_COLOR */