From c01904a2c75e962e5159dd42a640cce3d7370b13 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 3 Nov 2021 14:25:38 +0100 Subject: config: add [colors].dim0-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows you to configure custom colors to be used when colors are being dimmed (`\E[2m`). It is implemented by color matching (just like bold-text-in-bright=palette-based); the color-to-be-dimmed is matched against the current color palette. If it matches one of the regular colors (colors 0-7), the corresponding “dim” color will be used. If it matches one of the bright colors (colors 8-15), the corresponding “regular” color will be used (but *only* if the “dim” color has been set). Otherwise, the color is dimmed by reducing its luminance. The default behavior, i.e. when dim0-7 hasn’t been configured, is to dim by reducing luminance for *all* colors. I.e. we don’t do any color matching at all. In particular, this means that dimming a bright color will *not* result in the corresponding “regular” color. Closes #776 --- config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.h') diff --git a/config.h b/config.h index f0f95035..652f8422 100644 --- a/config.h +++ b/config.h @@ -158,6 +158,8 @@ struct config { uint32_t selection_bg; uint32_t url; + uint32_t dim[8]; + struct { uint32_t fg; uint32_t bg; @@ -173,6 +175,7 @@ struct config { bool jump_label:1; bool scrollback_indicator:1; bool url:1; + uint8_t dim; } use_custom; } colors; -- cgit v1.3