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
This commit is contained in:
Mitchell Kember
2020-07-19 16:49:10 -04:00
committed by David Peter
parent 00d1267bdd
commit f9d5e81f0e
5 changed files with 586 additions and 6 deletions

View File

@ -8,7 +8,7 @@ pub fn to_ansi_color(color: highlighting::Color, true_color: bool) -> ansi_term:
// Themes can specify one of the user-configurable terminal colors by
// encoding them as #RRGGBBAA with AA set to 00 (transparent) and RR set
// to the 8-bit color palette number. The built-in themes ansi-light,
// ansi-dark, and base16 use this.
// ansi-dark, base16, and base16-256 use this.
match color.r {
// For the first 8 colors, use the Color enum to produce ANSI escape
// sequences using codes 30-37 (foreground) and 40-47 (background).