From 7ed36c10334c0b2480fa026238f8f1791d2f9439 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 10 Oct 2025 11:10:38 +0200 Subject: config: add colors.dim-blend-towards=black|white Before this patch, we always blended towards black when dimming text. However, with light color themes, it usually looks better if we dim towards white instead. This option allows you to choose which color to blend towards. The default is 'black' in '[colors]', and 'white' in '[colors2]'. Closes #2187 --- render.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'render.c') diff --git a/render.c b/render.c index 35752125..fd721395 100644 --- a/render.c +++ b/render.c @@ -312,7 +312,14 @@ color_dim(const struct terminal *term, uint32_t color) } } - return color_blend_towards(color, 0x00000000, conf->dim.amount); + const struct color_theme *theme = term->colors.active_theme == COLOR_THEME1 + ? &conf->colors + : &conf->colors2; + + return color_blend_towards( + color, + theme->dim_blend_towards == DIM_BLEND_TOWARDS_BLACK ? 0x00000000 : 0x00ffffff, + conf->dim.amount); } static inline uint32_t -- cgit v1.3