aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-26 14:12:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-28 13:40:07 +0000
commitf3c5b82c8276feda3c9eec522e549062c1589484 (patch)
treec89b6e101aa72ab97865cff122b0a9935a52d6b9 /render.c
parentrender: revert part of a36f67cbe311bebd9321fbf58773dace8128fcd7 (diff)
config: add tweak.bold-text-in-bright-amount
By how much to increase the luminance when brightening bold fonts. This was previously hard-coded to a factor of 1.3, which is now the default value of the new config option. Closes #1434
Diffstat (limited to 'render.c')
-rw-r--r--render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/render.c b/render.c
index 37c0c97d..6771fae5 100644
--- a/render.c
+++ b/render.c
@@ -299,7 +299,9 @@ color_brighten(const struct terminal *term, uint32_t color)
int hue, sat, lum;
rgb_to_hsl(color, &hue, &sat, &lum);
- return hsl_to_rgb(hue, sat, min(100, lum * 1.3));
+
+ lum = (int)roundf(lum * term->conf->bold_in_bright.amount);
+ return hsl_to_rgb(hue, sat, min(lum, 100));
}
static void