diff options
| author | t <t@tjp.lol> | 2026-09-20 13:08:46 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-09-20 13:10:59 -0600 |
| commit | efbac44a016258fe59d5d880accfb14d2c234d2d (patch) | |
| tree | caa627ecb419cb73c689053cffa9dff4f517c6c4 /README.md | |
Some popular color themes, packaged up as a panto extension
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..f716ae8 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# panto-popular-themes + +`themes.popular` is a small, pure-Lua [pantograph](https://github.com/travisp/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` (Tokyo Night 270–290, Catppuccin Mocha 291–311, +Gruvbox Dark 312–332, Solarized Light 333–351, Solarized Dark 352–371, +Nord 372–394, Dracula 395–416, Tokyo Storm 417–437, Tokyo Moon 438–458, +Tokyo Day 459–479, Catppuccin Latte 480–500, Catppuccin Frappe 501–521, +Catppuccin Macchiato 522–542, Gruvbox Dark Hard 543–563, Gruvbox Dark +Soft 564–584, Gruvbox Light 585–605, Gruvbox Light Hard 606–626, +Gruvbox Light Soft 627–647, Dracula Soft 648–666; derivation +`makePalette` 1046–1105). Their source pins are the ones documented by Panto: + +- Tokyo Night: [`folke/tokyonight.nvim` at `cdc07ac`](https://github.com/folke/tokyonight.nvim/tree/cdc07ac78467a233fd62c493de29a17e0cf2b2b6) +- Catppuccin: [`catppuccin/nvim` at `edefef7`](https://github.com/catppuccin/nvim/tree/edefef779ab08ce1a4a404713e3012b0d202bd35) +- Gruvbox: [`ellisonleao/gruvbox.nvim` 2.0.0 at `61b0b3b`](https://github.com/ellisonleao/gruvbox.nvim/blob/61b0b3be2f0cfd521667403a0367298144d6c165/lua/gruvbox.lua) +- Solarized: [`maxmx03/solarized.nvim` 3.6.0 at `c0dfe1c`](https://github.com/maxmx03/solarized.nvim/tree/c0dfe1cbfabd93b546baf5f1408f5df7e02e2050) +- Nord: [`nordtheme/vim` at `f13f5df`](https://github.com/nordtheme/vim/blob/f13f5dfbb784deddbc1d8195f34dfd9ec73e2295/colors/nord.vim) +- Dracula: [`Mofiqul/dracula.nvim` at `ae752c1`](https://github.com/Mofiqul/dracula.nvim/tree/ae752c13e95fb7c5f58da4b5123cb804ea7568ee) + +Kanagawa is taken from the primary [`rebelot/kanagawa.nvim`](https://github.com/rebelot/kanagawa.nvim) +repository at pinned commit +[`bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3`](https://github.com/rebelot/kanagawa.nvim/tree/bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3), +using its [`colors.lua`](https://raw.githubusercontent.com/rebelot/kanagawa.nvim/bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3/lua/kanagawa/colors.lua) +and [`themes.lua`](https://raw.githubusercontent.com/rebelot/kanagawa.nvim/bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3/lua/kanagawa/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. This makes activating the extension +alongside Panto's built-ins or a third-party palette safe: any existing +identical or different registration wins, 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. |
