terminal_style_toolkit

Scripts / tools / config for terminal styling and colors / colours

Table of contents generated with markdown-toc

Notes

When testing out a color scheme/theme consider different use cases:

In general avoid:

Fonts Notes

Sample files

Scripts for running in terminal

Conversion tools

any2theme

Examples:

python putty/any2theme.py --help

# generate Putty registry export
py -3 any2theme.py some_theme.tstk --output_extension .reg
python putty/any2theme.py  C:\code\terminal\putty_themes\raw_themes\dracula.tstk --output_extension .reg


# generate Terminal Style Toolkit json tstk file
py -3 any2theme.py some_theme.tstk --output_extension .tstk -t terminal_style_toolkit_json.mustache
# From putty registry export
py -3 any2theme.py --output_extension .tstk -t terminal_style_toolkit_json.mustache some_theme.reg
# From alacritty TOML export
py -3 any2theme.py --output_extension .tstk -t terminal_style_toolkit_json.mustache some_theme.toml

# Generate Microsoft ColorTool INI output
py -3 any2theme.py some_theme.tstk --output_extension .ini -t ms_colortool_ini.mustache

# generate Base24 theme
py -3 any2theme.py some_theme.tstk --output_extension .yaml -t base24_scheme.mustache

TODO support alacritty.toml like (see existing issue for similar support for tstk):

[colors.cursor]
text = "CellBackground"

Misc tools

Putty

See Putty tools readme and also https://github.com/clach04/putty_themes/

Microsoft Windows CMD.exe

See colors https://github.com/microsoft/terminal/blob/71c75561e5df3db53cfe6f9da1173a46441b99ed/src/tools/ansi-color/ansi-color.cmd https://github.com/microsoft/terminal/blob/main/src/tools/ansi-color/ansi-color.cmd for example:

ansi-color.cmd colortest.def

See Color Tool (ColorTool) https://github.com/microsoft/terminal/releases/tag/1904.29002 The campbell.ini color scheme is the Windows 10 Fall Creator’s Update CMD out-of-box colors if need to restore to original colors.

From https://github.com/microsoft/terminal/tree/1904.29002/tools/ColorTool readme:

NOTE latest ColorTool source is located in https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool

ColorTool can use:

  1. json format as used by concfg https://github.com/lukesampson/concfg
  2. XML format as used by iTerm2-Color-Schemes - https://github.com/mbadolato/iTerm2-Color-Schemes/
  3. INI format, as provided in samples for ColorTool https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool

See ms_colortool_ini.mustache for generating ColorTool color themes.

Resources

Color Codes

ANSI colors are numbered:

0	black
1	red
2	green
3	yellow
4	blue
5	magenta
6	cyan
7	white

8	bright black
9	bright red
10	bright green
11	bright yellow
12	bright blue
13	bright magenta
14	bright cyan
15	bright white

Mappings; ColorTool, Putty / tstk, and Base24 / Tinted Theming

ColorTool INI Key | Colour Variable | Base24 Variable
------------------+-----------------+-----------------
BACKGROUND        | Colour2         | base00
DARK_BLACK        | Colour6         | base00 / base01
BRIGHT_BLACK      | Colour7         | base03 / base02
FOREGROUND        | Colour0         | base05
DARK_WHITE        | Colour20        | base06
BRIGHT_WHITE      | Colour21        | base07
DARK_RED          | Colour8         | base08
BRIGHT_RED        | Colour9         | base12
DARK_YELLOW       | Colour12        | base0A
BRIGHT_YELLOW     | Colour13        | base13
DARK_GREEN        | Colour10        | base0B
BRIGHT_GREEN      | Colour11        | base14
DARK_CYAN         | Colour18        | base0C
BRIGHT_CYAN       | Colour19        | base15
DARK_BLUE         | Colour14        | base0D
BRIGHT_BLUE       | Colour15        | base16
DARK_MAGENTA      | Colour16        | base0E
BRIGHT_MAGENTA    | Colour17        | base17

Color Tools

vim

NOTE Windows vim for cmd does NOT support italics https://github.com/vim/vim/commit/ac8a10ab7672aa5fd359f76d34d8b0187728b92d

vim themes that only use ANSI (16) colors - https://jeffkreeftmeijer.com/vim-16-color/

Midnight Commander

See https://github.com/jan-warchol/selenized/tree/putty/mc and https://github.com/jan-warchol/selenized/issues/7

MC’s default color settings assume that terminal’s blue will be very dark and suitable for use as background.

ls colors / dir_colors

Non-Terminal

TODO Resources

To checkout:

Color schemes that pass eyeball test but I’d like to checkout:

Color Scheme Collections