From a5f3142514862996265c350553650463ab59ea07 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 Feb 2024 10:02:38 +0530 Subject: [PATCH] hints kitten: The option to set the text color for hints now allows arbitrary colors Fixes #7150 --- docs/changelog.rst | 3 +++ kittens/hints/main.go | 2 +- kittens/hints/main.py | 14 ++++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0629eb17c..655dcbca9 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -57,6 +57,9 @@ Detailed list of changes - Allow specifying where the new tab is created for :ac:`detach_window` (:pull:`7134`) +- hints kitten: The option to set the text color for hints now allows arbitrary + colors (:pull:`7150`) + 0.32.2 [2024-02-12] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kittens/hints/main.go b/kittens/hints/main.go index 00b741920..068b72e86 100644 --- a/kittens/hints/main.go +++ b/kittens/hints/main.go @@ -167,7 +167,7 @@ func main(_ *cli.Command, o *Options, args []string) (rc int, err error) { fctx := style.Context{AllowEscapeCodes: true} faint := fctx.SprintFunc("dim") hint_style := fctx.SprintFunc(fmt.Sprintf("fg=%s bg=%s bold", o.HintsForegroundColor, o.HintsBackgroundColor)) - text_style := fctx.SprintFunc(fmt.Sprintf("fg=bright-%s bold", o.HintsTextColor)) + text_style := fctx.SprintFunc(fmt.Sprintf("fg=%s bold", o.HintsTextColor)) highlight_mark := func(m *Mark, mark_text string) string { hint := encode_hint(m.Index, alphabet) diff --git a/kittens/hints/main.py b/kittens/hints/main.py index eebf9ea25..1a9c71e48 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -215,19 +215,25 @@ bottom. --hints-foreground-color default=black type=str -The foreground color for hints. +The foreground color for hints. You can use color names or hex values. For the eight basic +named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the +color. --hints-background-color default=green type=str -The background color for hints. +The background color for hints. You can use color names or hex values. For the eight basic +named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the +color. --hints-text-color -default=gray +default=bright-gray type=str -The foreground color for text pointed to by the hints. +The foreground color for text pointed to by the hints. You can use color names or hex values. For the eight basic +named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the +color. --customize-processing