UI & themes

panto-popular-themes

rock 0.1.1-1Source

themes.popular is a small, pure-Lua pantograph extension. It registers the 19 popular palettes currently built into Panto as well as three Kanagawa variants, using the same role-to-SGR derivation as the core.

Install

Add the rock to Panto's extension list:

TOML
[extensions]
rocks = ["panto-popular-themes"]

The extension is named themes.popular; theme names are case-sensitive.

Themes

  • Tokyo Night
  • Catppuccin Mocha
  • Gruvbox Dark
  • Solarized Light
  • Solarized Dark
  • Nord
  • Dracula
  • Tokyo Storm
  • Tokyo Moon
  • Tokyo Day
  • Catppuccin Latte
  • Catppuccin Frappe
  • Catppuccin Macchiato
  • Gruvbox Dark Hard
  • Gruvbox Dark Soft
  • Gruvbox Light
  • Gruvbox Light Hard
  • Gruvbox Light Soft
  • Dracula Soft
  • Kanagawa Wave
  • Kanagawa Dragon
  • Kanagawa Lotus

Provenance and mapping

The first 19 palettes are faithful ports of the data and role derivation in src/tui_theme.zig: each palette block (Tokyo Night at 270–290, through Dracula Soft at 648–666) and makePalette at 1046–1105. Their source pins are the ones documented by Panto:

Kanagawa is taken from the primary rebelot/kanagawa.nvim repository at pinned commit bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3, using its colors.lua and themes.lua.

Wave, Dragon, and Lotus map Normal foreground/background, Comment, semantic syntax groups, NormalFloat, Title/Directory, and diagnostics into Panto's 17-color palette.

Kanagawa authors real DiffAdd/DiffDelete backgrounds, so those are retained. The 20% canvas/status tint is used only when a source palette does not provide a diff background.

As in core, each palette emits all 40 role SGR strings and reset = ESC[0m.

Activation first performs a read-only lookup for each name and registers only names that are not already present. That makes activating the extension alongside Panto's built-ins or a third-party palette safe: any existing registration wins, identical or not, while malformed values for a new registration still raise.

The stock panto palette and Panto's five original palettes—Tidepool Tumble, Mossmallow, Peachy Pudding, Plum Pips, and Gilded Inkblot—stay in core and are not registered here.

Development

SH
panto lua _selfcheck.lua
PANTOGRAPH_DIR="${PANTOGRAPH_DIR:-../pantograph}"
REPO_DIR="$(pwd)"
(cd "$PANTOGRAPH_DIR" && panto lua "$REPO_DIR/scripts/verify-against-core.lua")

The second check uses the real Panto theme registry: it compares every role in the extension's computed snapshots with the 19 corresponding core snapshots, reporting the theme and role for any byte mismatch, then activates the extension to validate registration of the three Kanagawa additions.