A personal Go theme generator for keeping terminal, shell, editor, writing, and Neovim colors aligned from one OKLCH palette model.
The generator is the product center. It renders dark and light themes from shared color tokens into target-specific templates. The optional web generator is a local helper for hue exploration and output inspection.
- Ghostty
- Fish shell
- VS Code / Cursor
- Typora dark and light themes
- Neovim
go run ./cli serve
go run ./cli link --dry-run
# then, when the plan looks right:
go run ./cli linkOr use Make:
make serve
make link
make testThe generator UI is the only build entry point. Start it with make serve, adjust hues and lightness, then click Apply to rewrite colors/palette.go and render every target into build/ (including build/palette.md and build/palette.json).
go run ./cli serve: start the local web generator atlocalhost:9090. Apply rewritescolors/palette.goand renders all targets.go run ./cli link --dry-run: preview install symlink replacements without mutating local config.go run ./cli link: replace installed target paths with symlinks to generated output.go test ./...: run generator, renderer, linker, and web helper tests.
link removes each listed target path before creating a symlink. Use it only when you intend to replace the generated theme installs.
- Ghostty:
~/.config/ghostty/themes/ - Fish:
~/.config/fish/themes/ - VS Code:
~/.vscode/extensions/gg-theme - Cursor:
~/.cursor/extensions/gg-theme - Typora:
~/Library/Application Support/abnerworks.Typora/themes/ - Neovim:
~/.config/nvim/colors/
colors/ palette contract, OKLCH generation, contrast checks
palette.go Palette, ThemeConfig, DefaultConfig
generate.go dark and light palette generation
contrast.go contrast validation and palette dump helpers
themes/ embedded templates, build, link, render helpers
build.go render list and template execution
link.go install symlink list
templates/ Ghostty, Fish, VS Code, Neovim, Typora templates
theme-generator/ optional local web generator
server.go HTTP server and palette API
web/index.html browser UI for hue exploration and output preview
cli/ command entry point
build/ generated output, do not hand-edit
- Run
make serveand openlocalhost:9090. - Adjust hues and lightness. Click Apply to rewrite
colors/palette.goand render all targets intobuild/. - Inspect generated output, starting with
build/palette.md. - Run
go test ./.... - Run
go run ./cli link --dry-runto preview install changes. - Run
go run ./cli linkonly when you intentionally want to update installed local themes.
For deeper changes (new tokens, generation behavior), edit colors/generate.go directly, then re-apply through the UI.
- Add a template under
themes/templates/. - Add render output in
themes.Build(). - Add install symlinks in
themes.Link(). - Add tests or update existing target coverage.
- Run
go test ./...and re-apply via the generator UI to refreshbuild/.
Keep themes.Build() and themes.Link() aligned when targets change.