mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 01:38:02 +02:00
Add foreground override contrast threshold
This adds a parameter to text_composition_strategy that specifies a percentage difference luminance below which the foreground color will be overridden. The foreground color is set to white if the background is dark or black if the background is light. Many programs output colors that look good with the author's terminal's color scheme but which are completely illegible with other color schemes. This allows the user ensure that there is always sufficient contrast to read the text on the screen. Since we want existing configs to continue working, this also makes it so that rather than taking exactly two parameters, text_composition_strategy takes one--three parameters, using the default values for those not specified.
This commit is contained in:
@@ -48,7 +48,7 @@ typedef struct {
|
||||
WindowTitleIn macos_show_window_title_in;
|
||||
char *bell_path, *bell_theme;
|
||||
float background_opacity, dim_opacity;
|
||||
float text_contrast, text_gamma_adjustment;
|
||||
float text_contrast, text_gamma_adjustment, text_fg_override_threshold;
|
||||
bool text_old_gamma;
|
||||
|
||||
char *background_image, *default_window_logo;
|
||||
|
||||
Reference in New Issue
Block a user