aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-10-10 09:10:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-10-10 09:10:38 +0000
commit7ed36c10334c0b2480fa026238f8f1791d2f9439 (patch)
treedffe1021b5d308fb856185d8f64c7a7197df145a /render.c
parentchangelog: updated jump label colors in modus-operandi (diff)
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
Diffstat (limited to 'render.c')
-rw-r--r--render.c9
1 files changed, 8 insertions, 1 deletions
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