On Wed, Jul 15, 2020 at 10:26:12AM -0600, Theo de Raadt wrote: > > So here is a new iteration taking feedback into account, using the > > #if WS_DEFAULT_BG == WSCOL_WHITE check for clarity, and also switching > > the foreground color of printed kernel messages to light cyan to improve > > contrast and readability. > > I really dislike how two issues are being mixed into one diff.
Right. This was to allow easier testing by having only one diff to apply, and that's why I wasn't explicitely asking for OKs. So let's move forward with this, here is a diff addressing only the color palette changes. OK? Index: sys/dev/rasops/rasops.c =================================================================== RCS file: /cvs/src/sys/dev/rasops/rasops.c,v retrieving revision 1.63 diff -u -p -r1.63 rasops.c --- sys/dev/rasops/rasops.c 11 Jul 2020 15:02:52 -0000 1.63 +++ sys/dev/rasops/rasops.c 15 Jul 2020 14:55:45 -0000 @@ -47,7 +47,8 @@ /* ANSI colormap (R,G,B) */ -#define NORMAL_BLACK 0x000000 +#if WS_DEFAULT_BG == WSCOL_WHITE +#define NORMAL_BLACK 0x000000 /* Rasops palette */ #define NORMAL_RED 0x7f0000 #define NORMAL_GREEN 0x007f00 #define NORMAL_BROWN 0x7f7f00 @@ -64,6 +65,25 @@ #define HILITE_MAGENTA 0xff00ff #define HILITE_CYAN 0x00ffff #define HILITE_WHITE 0xffffff +#else +#define NORMAL_BLACK 0x000000 /* VGA text mode palette */ +#define NORMAL_RED 0xaa0000 +#define NORMAL_GREEN 0x00aa00 +#define NORMAL_BROWN 0xaa5500 +#define NORMAL_BLUE 0x0000aa +#define NORMAL_MAGENTA 0xaa00aa +#define NORMAL_CYAN 0x00aaaa +#define NORMAL_WHITE 0xaaaaaa + +#define HILITE_BLACK 0x555555 +#define HILITE_RED 0xff5555 +#define HILITE_GREEN 0x55ff55 +#define HILITE_BROWN 0xffff55 +#define HILITE_BLUE 0x5555ff +#define HILITE_MAGENTA 0xff55ff +#define HILITE_CYAN 0x55ffff +#define HILITE_WHITE 0xffffff +#endif const u_char rasops_cmap[256 * 3] = { #define _C(x) ((x) & 0xff0000) >> 16, ((x) & 0x00ff00) >> 8, ((x) & 0x0000ff)