diff options
author | Elwardi <elwardifadeli@gmail.com> | 2021-08-07 16:06:36 +0100 |
---|---|---|
committer | Elwardi <elwardifadeli@gmail.com> | 2021-08-07 16:06:36 +0100 |
commit | b5d8849c06de3d0ea410e0ba03e66b101b1ec626 (patch) | |
tree | 07671c4286286cae63621d92e801ffbbdd213ac1 /pkg/gui/style | |
parent | 5d1a9639b6dc7f2a5267cb2f919f96a6f7bd95d1 (diff) |
Support match colors in `labelFormat` entry in menuFromCommand prompts
Diffstat (limited to 'pkg/gui/style')
-rw-r--r-- | pkg/gui/style/basic_styles.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/gui/style/basic_styles.go b/pkg/gui/style/basic_styles.go index ef29904bc..373172a8b 100644 --- a/pkg/gui/style/basic_styles.go +++ b/pkg/gui/style/basic_styles.go @@ -27,6 +27,21 @@ var ( AttrUnderline = New().SetUnderline() AttrBold = New().SetBold() + + ColorMap = map[string]struct { + Foreground TextStyle + Background TextStyle + }{ + "default": {FgWhite, BgBlack}, + "black": {FgBlack, BgBlack}, + "red": {FgRed, BgRed}, + "green": {FgGreen, BgGreen}, + "yellow": {FgYellow, BgYellow}, + "blue": {FgBlue, BgBlue}, + "magenta": {FgMagenta, BgMagenta}, + "cyan": {FgCyan, BgCyan}, + "white": {FgWhite, BgWhite}, + } ) func FromBasicFg(fg color.Color) TextStyle { |