mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Remove glsl if-else, add macro, separate new opt
This adds a config option called text_fg_override_threshold 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. The default is 0, and the computations will only be performed if the option is set. 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. I originally implemented this is as a parameter on text_composition_strategy. For that to work, the option needed to take _up to_ rather than _exactly_ the number of available parameters. While it now has nothing to do with the new feature, it seems like that change should be made anyway, so I'm leaving it in for now.
This commit is contained in:
@@ -48,7 +48,8 @@ typedef struct {
|
||||
WindowTitleIn macos_show_window_title_in;
|
||||
char *bell_path, *bell_theme;
|
||||
float background_opacity, dim_opacity;
|
||||
float text_contrast, text_gamma_adjustment, text_fg_override_threshold;
|
||||
float text_contrast, text_gamma_adjustment;
|
||||
float text_fg_override_threshold;
|
||||
bool text_old_gamma;
|
||||
|
||||
char *background_image, *default_window_logo;
|
||||
|
||||
Reference in New Issue
Block a user