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
This commit is contained in:
Daniel Eklöf 2025-10-10 11:10:38 +02:00
parent 371837ef7b
commit 7ed36c1033
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 51 additions and 4 deletions

View file

@ -753,6 +753,11 @@ test_section_colors(void)
(int []){ALPHA_MODE_DEFAULT, ALPHA_MODE_MATCHING, ALPHA_MODE_ALL},
(int *)&conf.colors.alpha_mode);
test_enum(&ctx, &parse_section_colors, "dim-blend-towards", 2,
(const char *[]){"black", "white"},
(int []){DIM_BLEND_TOWARDS_BLACK, DIM_BLEND_TOWARDS_WHITE},
(int *)&conf.colors.dim_blend_towards);
for (size_t i = 0; i < 255; i++) {
char key_name[4];
sprintf(key_name, "%zu", i);