mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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:
parent
371837ef7b
commit
7ed36c1033
7 changed files with 51 additions and 4 deletions
9
render.c
9
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue