Repository navigation
v0.9.0
anchor 0.9.0 is about color: write your own themes, in any color your terminal can show, and share them as one small file.
New
Theme files. Put a JSON file in ~/.anchor/themes/ and its name works anywhere a built-in theme does: /theme ember, --theme ember, the setup wizard, or "theme": "ember" in the config. A file can start from a built-in theme with base, so it only lists what it changes. If part of a file can't be read, anchor says which file and what's wrong, and uses the rest.
Palettes. Name your colors once ("ember": "#ff6a1f") and use the names in every role ("accent": "bold ember"), so you can retune a theme in one place.
Hex and 256-colors. A color can be a hex color (#ff6a1f, or #f62) or a 256-color number (208), in theme files and in the config's colors. On a terminal that doesn't show 24-bit color, each hex color is drawn as the closest 256-color. anchor reads COLORTERM, and recognizes Windows Terminal, mintty, iTerm2, WezTerm, VS Code, Ghostty, kitty and Alacritty. If your terminal shows 24-bit color but anchor doesn't recognize it, set COLORTERM=truecolor.
Backgrounds. on makes the color after it a background, for any role: "code": "sand on #2a201b". Three new roles go further:
textsets plain text and paints the whole full screen:"#eadfd4 on #1c1512"puts light text on charcoal, so a theme looks the same whatever your terminal's colors are.codeblockshades code blocks in replies to the edge of the screen.selectioncolors the chosen suggestion and search matches.
text and codeblock show in the full-screen REPL only. Nothing changes your terminal's own settings, so everything goes back to normal when anchor exits.
/theme shows each theme's colors. Each name is drawn in its theme's accent, followed by a dot in each of its main colors. /theme reads theme files again each time, so you can edit a file and run /theme <name> to see the change without restarting.
/theme save <name> writes the current colors to ~/.anchor/themes/<name>.json as a starting point to change or share. It never overwrites a file that's already there.
A rust theme. Warm oranges and rust reds around your terminal's white text, for dark backgrounds.
Sample themes. The themes folder has six to use or start from: ember, tide, forest, neon and phosphor (256-colors only) with dark backgrounds, and paper with a light one. Each paints its own background, code block shade and selection. To use one, copy its file into ~/.anchor/themes/.
Changed
- In the full screen, text with no color of its own takes the theme's
textcolor. With the built-in themes, which don't set one, it's still the terminal's own.
All of this came in #15.
Upgrade
brew upgrade anchor # Homebrew
scoop update anchor # Scoop
curl -fsSL https://raw.githubusercontent.com/fuseraft/anchor/main/install.sh | bash # install scriptDocs: Making a theme · theme and colors
Full Changelog: v0.8.6...v0.9.0