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 --- doc/foot.ini.5.scd | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 1e38b036..9f5c429b 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -499,6 +499,36 @@ can configure the background transparency with the _alpha_ option. _bfebbf_, _f0dfaf_, _8cd0d3_, _fcace3_, _b3ffff_ and _ffffff_ (a variant of the _zenburn_ theme). +*dim0*, *dim1* *..* *dim7* + Custom colors to use with dimmed colors. Dimmed colors do not have + an entry in the color palette. Applications emit them by combining + a color value, and a "dim" attribute. + + By default, foot implements this by reducing the luminance of the + current color. This is a generic approach that applies to both + colors from the 256-color palette, as well as 24-bit RGB colors. + + You can change this behavior by setting the *dimN* options. When + set, foot will match the current color against the color palette, + and if it matches one of the *regularN* colors, the corresponding + *dimN* color will be used. + + If instead the current color matches one of the *brightN* colors, + the corresponding *regularn* color will be used. + + If the current color does not match any known colors, it is dimmed + by reducing the luminance (i.e. the same behavior as if the *dimN* + options are unconfigured). 24-bit RGB colors will typically fall + into this category. + + Note that applications can change the *regularN* and *brighN* + colors at runtime. However, they have no way of changing the + *dimN* colors. If an application has changed the *regularN* + colors, foot will still use the corresponding *dimN* color, as + configured in foot.ini. + + Default: _not set_. + *0* *..* *255* Arbitrary colors in the 256-color palette. Default: for *0* *..* *15*, see regular and bright defaults above; see -- cgit v1.3