summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMitchell Kember <mk12360@gmail.com>2020-07-19 16:49:10 -0400
committerDavid Peter <sharkdp@users.noreply.github.com>2020-08-03 11:39:49 +0200
commitf9d5e81f0e72a130ccbe466c82ee1a0acb919c3d (patch)
tree1c75871180fea7817143c2a67b2762a4f9c96bbe /README.md
parent00d1267bddd88e2008910414c25b20b13045c088 (diff)
Add new theme: base16-256
Bat already has a base16 theme. The new base16-256 theme is for users of base16-shell, who configure their terminal with a 256-color variant of a base16 theme. These variants put some of the base16 colors in elsewhere in the 256-color table to avoid clobbering bright color slots (ansi codes 8 to 15) with colors that don't respect the ordinary meaning of that slot (e.g. bright green in ordinary base16 is not green). For more details, see https://github.com/chriskempson/base16-shell
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4bd108ad..ef0d68e2 100644
--- a/README.md
+++ b/README.md
@@ -354,6 +354,26 @@ light background, some themes like `GitHub` or `OneHalfLight` will work better f
You can also use a custom theme by following the
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
+### 8-bit themes
+
+`bat` has four themes that always use [8-bit colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors),
+even when truecolor support is available:
+
+- `ansi-dark` looks decent on any terminal with a dark background. It uses 3-bit colors: black, red,
+ green, yellow, blue, magenta, cyan, and white.
+- `ansi-light` is like `ansi-dark`, but for terminals with a light background.
+- `base16` is designed for [base16](https://github.com/chriskempson/base16) terminal themes. It uses
+ 4-bit colors (3-bit colors plus bright variants) in accordance with the
+ [base16 styling guidelines](https://github.com/chriskempson/base16/blob/master/styling.md).
+- `base16-256` is designed for [base16-shell](https://github.com/chriskempson/base16-shell).
+ It replaces certain bright colors with 8-bit colors from 16 to 21. **Do not** use this simply
+ because you have a 256-color terminal but are not using base16-shell.
+
+Although these themes are more restricted, they have two advantages over truecolor themes:
+
+- They harmonize better with other terminal software using 3-bit or 4-bit colors.
+- When you change your terminal theme, `bat` output already on the screen will update to match.
+
### Output style
You can use the `--style` option to control the appearance of `bat`s output.
@@ -554,9 +574,10 @@ bat() {
### Terminals & colors
-`bat` handles terminals *with* and *without* truecolor support. However, the colors in the syntax
-highlighting themes are not optimized for 8-bit colors and it is therefore strongly recommended
-that you use a terminal with 24-bit truecolor support (`terminator`, `konsole`, `iTerm2`, ...).
+`bat` handles terminals *with* and *without* truecolor support. However, the colors in most syntax
+highlighting themes are not optimized for 8-bit colors. It is therefore strongly recommended
+that you use a terminal with 24-bit truecolor support (`terminator`, `konsole`, `iTerm2`, ...),
+or use one of the basic [8-bit themes](#8-bit-themes) designed for a restricted set of colors.
See [this article](https://gist.github.com/XVilka/8346728) for more details and a full list of
terminals with truecolor support.