From aaf165bcbaf86948780c61cd9b877d6b0cf414f1 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 30 Apr 2023 12:50:52 +0200 Subject: only make color bright when code < 8 --- config.h | 2 +- swt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.h b/config.h index 946a548..03e1e83 100644 --- a/config.h +++ b/config.h @@ -162,7 +162,7 @@ static uint32_t colors[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 258; +unsigned int defaultfg = 7; unsigned int defaultbg = 259; unsigned int defaultcs = 256; static unsigned int defaultrcs = 257; diff --git a/swt.c b/swt.c index 82376c6..39f50c9 100644 --- a/swt.c +++ b/swt.c @@ -225,10 +225,10 @@ get_color(uint32_t i, ushort mode) } if ((mode & ATTR_BOLD)) { - if (!BETWEEN(i - 8, 0, sizeof(colors) / sizeof(uint32_t))) { + if (!BETWEEN(i + 8, 0, sizeof(colors) / sizeof(uint32_t))) { return colors[i]; } - return colors[i - 8]; + return colors[i + 8]; } return colors[i]; -- cgit v1.2.3-70-g09d2