mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-08 11:23:47 -05:00
Adjust base16 (16) theme (#4501)
Motivation: `--color base16` can be a better default than `dark` or `light`, since it uses the colors defined by the current theme. This usually blends in more naturally and works well in both light and dark modes. However, some elements were previously hard-coded with white or black foreground colors, which can cause rendering issues in certain terminal themes.
This commit is contained in:
@@ -4,6 +4,7 @@ CHANGELOG
|
||||
0.66.0
|
||||
------
|
||||
- Style changes
|
||||
- Updated `--color base16` (alias: `16`) theme so that it works better with both dark and light themes.
|
||||
- Narrowed the gutter column by using the left-half block character (`▌`).
|
||||
- Removed background colors from markers.
|
||||
- Added `--gutter CHAR` option for customizing the gutter column. Some examples using [box-drawing characters](https://en.wikipedia.org/wiki/Box-drawing_characters):
|
||||
|
||||
@@ -246,11 +246,11 @@ color mappings. Each entry is separated by a comma and/or whitespaces.
|
||||
|
||||
.RS
|
||||
.B BASE SCHEME:
|
||||
(default: \fBdark\fR on 256-color terminal, otherwise \fB16\fR; If \fBNO_COLOR\fR is set, \fBbw\fR)
|
||||
(default: \fBdark\fR on 256-color terminal, otherwise \fBbase16\fR; If \fBNO_COLOR\fR is set, \fBbw\fR)
|
||||
|
||||
\fBdark \fRColor scheme for dark 256-color terminal
|
||||
\fBlight \fRColor scheme for light 256-color terminal
|
||||
\fB16 \fRColor scheme for 16-color terminal
|
||||
\fBdark \fRColor scheme for dark terminal
|
||||
\fBlight \fRColor scheme for light terminal
|
||||
\fBbase16 \fRColor scheme using base 16 colors (alias: \fB16\fR)
|
||||
\fBbw \fRNo colors (equivalent to \fB\-\-no\-color\fR)
|
||||
|
||||
.B COLOR NAMES:
|
||||
|
||||
@@ -59,7 +59,7 @@ Usage: fzf [options]
|
||||
|
||||
GLOBAL STYLE
|
||||
--style=PRESET Apply a style preset [default|minimal|full[:BORDER_STYLE]
|
||||
--color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors
|
||||
--color=COLSPEC Base scheme (dark|light|base16|bw) and/or custom colors
|
||||
--no-color Disable colors
|
||||
--no-bold Do not use bold text
|
||||
|
||||
@@ -1326,7 +1326,7 @@ func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, erro
|
||||
theme = dupeTheme(tui.Dark256)
|
||||
case "light":
|
||||
theme = dupeTheme(tui.Light256)
|
||||
case "16":
|
||||
case "base16", "16":
|
||||
theme = dupeTheme(tui.Default16)
|
||||
case "bw", "no":
|
||||
theme = tui.NoColorTheme()
|
||||
|
||||
@@ -303,6 +303,14 @@ const (
|
||||
colMagenta
|
||||
colCyan
|
||||
colWhite
|
||||
colGrey
|
||||
colBrightRed
|
||||
colBrightGreen
|
||||
colBrightYellow
|
||||
colBrightBlue
|
||||
colBrightMagenta
|
||||
colBrightCyan
|
||||
colBrightWhite
|
||||
)
|
||||
|
||||
type FillReturn int
|
||||
@@ -923,19 +931,19 @@ func init() {
|
||||
SelectedFg: ColorAttr{colUndefined, AttrUndefined},
|
||||
SelectedBg: ColorAttr{colUndefined, AttrUndefined},
|
||||
SelectedMatch: ColorAttr{colUndefined, AttrUndefined},
|
||||
DarkBg: ColorAttr{colBlack, AttrUndefined},
|
||||
DarkBg: ColorAttr{colGrey, AttrUndefined},
|
||||
Prompt: ColorAttr{colBlue, AttrUndefined},
|
||||
Match: ColorAttr{colGreen, AttrUndefined},
|
||||
Current: ColorAttr{colYellow, AttrUndefined},
|
||||
CurrentMatch: ColorAttr{colGreen, AttrUndefined},
|
||||
Current: ColorAttr{colBrightWhite, AttrUndefined},
|
||||
CurrentMatch: ColorAttr{colBrightGreen, AttrUndefined},
|
||||
Spinner: ColorAttr{colGreen, AttrUndefined},
|
||||
Info: ColorAttr{colWhite, AttrUndefined},
|
||||
Info: ColorAttr{colYellow, AttrUndefined},
|
||||
Cursor: ColorAttr{colRed, AttrUndefined},
|
||||
Marker: ColorAttr{colMagenta, AttrUndefined},
|
||||
Header: ColorAttr{colCyan, AttrUndefined},
|
||||
Footer: ColorAttr{colCyan, AttrUndefined},
|
||||
Border: ColorAttr{colBlack, AttrUndefined},
|
||||
BorderLabel: ColorAttr{colWhite, AttrUndefined},
|
||||
Border: ColorAttr{colDefault, Dim},
|
||||
BorderLabel: ColorAttr{colDefault, AttrUndefined},
|
||||
Ghost: ColorAttr{colUndefined, Dim},
|
||||
Disabled: ColorAttr{colUndefined, AttrUndefined},
|
||||
PreviewFg: ColorAttr{colUndefined, AttrUndefined},
|
||||
|
||||
Reference in New Issue
Block a user