Skip to content
binRickPublic

About

Terminal Pallete Manager

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

20 Commits

Folders and files

Repository files navigation

pal β€” terminal palette switcher

Go Palettes Zero deps License

Switch your terminal's color palette instantly. 420 themes compiled into a single static binary. No config. No runtime deps.


✨ Features

  • 🎨 420 palettes β€” dracula, nord, gruvbox, monokai, solarized, rose-pine, and hundreds more
  • ⚑ Instant β€” writes OSC escape sequences directly to stdout, takes effect immediately
  • πŸ“¦ Self-contained β€” all palette data compiled in via //go:embed, nothing to install separately
  • πŸ–₯️ Cross-terminal β€” works in xterm, VTE, iTerm2, Kitty, Alacritty, WezTerm, and more
  • πŸ”Ž Search & filter β€” pal list gruvbox --light, with color swatches via -v
  • 🎯 Interactive picker β€” pal pick re-themes your terminal live as you move through the list
  • πŸ‘ True preview β€” see any palette in its own colors without changing yours
  • 🎲 Random mode β€” explore palettes with pal random, optionally --dark / --light
  • πŸ’Ύ Save β€” pal save <name> keeps a theme for every new shell
  • 🧹 Reset β€” pal reset hands the colors back to your terminal's own settings
  • πŸͺŸ tmux-aware β€” sequences are passed through to the outer terminal
  • πŸ“‹ Shell export β€” dump a theme as shell code for your .bashrc / .zshrc

πŸ–₯️ Demo

Switch palettes β€” instantly, with typo suggestions and a way back

Switching palettes with pal, pal random and pal reset

Pick β€” move through the list and watch your terminal change

pal pick: an interactive picker with live preview

Browse β€” search, swatches, and a preview that doesn't touch your terminal

pal list with filters and swatches, and pal preview

Save β€” keep the current palette for every new shell

pal save writing the current palette into the shell config

🎨 Palette Showcase

palette showcase

πŸ“¦ Install

One-line install (macOS, Linux, Windows)

macOS, Linux, and Git Bash / WSL on Windows:

curl -fsSL https://raw.githubusercontent.com/binRick/pal/main/install.sh | sh

Windows PowerShell:

irm https://raw.githubusercontent.com/binRick/pal/main/install.ps1 | iex

The script downloads the release binary for your system (Intel or ARM) into ~/.local/bin (%LOCALAPPDATA%\pal on Windows) and verifies its checksum when the release publishes one. Set PAL_VERSION=v0.2.1 to pin a release, or PAL_INSTALL_DIR to install elsewhere.

Homebrew (macOS)

brew install binRick/tap/pal

Build from source

git clone https://github.com/binRick/pal
cd pal
go build -o pal .
sudo mv pal /usr/local/bin/

Static binary (Docker, no Go required)

./build.sh          # produces ./pal (fully static, no libc)
sudo mv pal /usr/local/bin/

πŸš€ Usage

pal list [filter]        πŸ“‹ list palettes (-v adds color swatches)
pal set <name>           πŸ–Œ  apply a palette to the current terminal
pal preview <name>       πŸ‘  show a palette's colors without applying it
pal pick [filter]        🎯 choose interactively, with live preview
pal random [filter]      🎲 apply a random palette
pal save [name]          πŸ’Ύ keep the current (or named) palette for new shells (~/.zshrc, ~/.bashrc)
pal reset                🧹 restore the terminal's own colors
pal export <name>        πŸ“„ print shell code to apply the palette (for .bashrc)
pal <name>               ⚑ shorthand for "pal set <name>"

A filter is any number of words that must all appear in the name, plus --dark or --light to select by background brightness. Mistyped a name? pal suggests the closest matches.

Quick examples

# Apply a theme
pal dracula-dark
pal nord
pal monokai-dark

# Look at a theme without changing your terminal
pal preview rose-pine-dark

# Search for themes
pal list gruvbox             # names containing "gruvbox"
pal list --light             # light backgrounds only
pal list -v base16 ocean     # with color swatches

# Pick interactively: arrows move, typing filters, Enter keeps, Esc puts things back
pal pick
pal pick --light

# Random theme, dark backgrounds only
pal random --dark

# Keep the theme you have on now for every new shell
pal save

# ...or apply and keep a named one
pal save nord

# Back to your terminal's own colors
pal reset

# Export to .bashrc β€” no pal binary needed at shell startup
pal export dracula-dark >> ~/.bashrc

πŸ’Ύ Save

pal save keeps the palette you last applied (pal remembers its name in ~/.local/state/pal/current); pal save <name> applies that one first. Either way it is written into the startup file of the shell you ran it from β€” ~/.zshrc (or $ZDOTDIR/.zshrc) for zsh, ~/.bashrc for bash. The code lives in a marked block, so saving again replaces the previous theme instead of piling up, and the rest of the file is left alone:

# >>> pal >>>
# nord β€” written by `pal save`; run it again to change, or delete this block.
if [ -n "${TMUX:-}" ]; then … fi
# <<< pal <<<

To stop, delete the block. Other shells: use pal export below.


πŸ“„ Shell Export

pal export <name> prints the OSC escape sequences as a shell one-liner. Paste it into your .bashrc or .zshrc to apply the palette on every terminal open β€” no pal binary required at runtime. The snippet checks $TMUX itself and uses tmux passthrough when the shell starts inside tmux.

$ pal export dracula-dark
if [ -n "${TMUX:-}" ]; then tmux set -gqs allow-passthrough on >/dev/null 2>&1; printf '\033Ptmux;…'; else printf '\033]4;0;#44475A\033\\\033]4;1;#FF5555\033\\ ... \033]12;#94A3A5\033\\'; fi

Add to your shell profile:

echo "$(pal export dracula-dark)" >> ~/.bashrc

🎨 All Palettes

Click to expand β€” 420 palettes across two formats

Base16 family

base16-3024-dark Β· base16-ashes-dark Β· base16-bespin-dark Β· base16-brewer-dark Β· base16-chalk-dark Β· base16-codeschool-dark Β· base16-default-dark Β· base16-dracula Β· base16-eighties-dark Β· base16-embers-dark Β· base16-google-dark Β· base16-grayscale-dark Β· base16-gruvbox-hard Β· base16-gruvbox-medium Β· base16-gruvbox-soft Β· base16-isotope-dark Β· base16-londontube-dark Β· base16-monokai-dark Β· base16-nord Β· base16-ocean-dark Β· base16-onedark Β· base16-paraiso-dark Β· base16-railscasts-dark Β· base16-solarized-dark Β· base16-tomorrow-night Β· base16-twilight-dark Β· and many more

Popular editor themes

dracula-dark Β· monokai-dark Β· nord Β· gruvbox-dark Β· solarized-dark Β· solarized-light Β· rose-pine-dark Β· onedark-dark Β· tomorrow-night-dark Β· gotham-dark Β· cyberpunk-dark Β· fairyfloss-dark Β· night-owl-dark Β· vscode Β· atom-dark Β· ayu-dark Β· afterglow-dark Β· challengerdeep-dark

DKEG designer series

dkeg-amiox Β· dkeg-bark Β· dkeg-blend Β· dkeg-blok Β· dkeg-branch Β· dkeg-coco Β· dkeg-corduroy Β· dkeg-depth Β· dkeg-fury Β· dkeg-kit Β· dkeg-leaf Β· dkeg-lumen Β· dkeg-owl Β· dkeg-poly Β· dkeg-shade Β· dkeg-sprout Β· dkeg-subtle Β· dkeg-urban Β· dkeg-victory Β· and 30+ more

Tempus series

tempus_autumn Β· tempus_classic Β· tempus_day Β· tempus_dusk Β· tempus_future Β· tempus_night Β· tempus_rift Β· tempus_spring Β· tempus_summer Β· tempus_tempest Β· tempus_warp Β· tempus_winter

Sexy themes

sexy-monokai Β· sexy-gotham Β· sexy-material Β· sexy-hybrid Β· sexy-tango Β· sexy-neon Β· sexy-zenburn Β· and 50+ more


βš™οΈ How It Works

pal applies color palettes using OSC (Operating System Command) escape sequences β€” the same mechanism used by terminal emulators like iTerm2's built-in theme switcher.

\033]4;N;#RRGGBB\033\   β†’  set palette color N (0–15)
\033]10;#RRGGBB\033\    β†’  set foreground color
\033]11;#RRGGBB\033\    β†’  set background color
\033]12;#RRGGBB\033\    β†’  set cursor color
\033]104\033\ Β· 110 Β· 111 Β· 112  β†’  reset palette / foreground / background / cursor

These sequences are interpreted live by your terminal. No restart required β€” the change takes effect immediately.

  • They go to stdout when it is a terminal, and to /dev/tty otherwise, so pal still recolors the terminal from scripts, hooks and $(...).
  • Inside tmux each sequence is wrapped in DCS passthrough (and allow-passthrough is switched on) so it reaches the outer terminal.
  • pal pick asks the terminal for its current colors first (OSC ? queries), so Esc can put them back exactly; it reads keys through stty, so it needs macOS or Linux.
  • pal preview and pal list -v paint with 24-bit color when $COLORTERM announces it, and fall back to the nearest of the 256 xterm colors otherwise.

Palette formats

Two formats from c_palettes are supported and compiled in:

Format Location Structure
paleta palettes/paleta/ 19-line hex values: fg, bg, cursor, then colors 0–15
kfc palettes/kfc/dark/ key=value pairs: color00=rrggbb, foreground=rrggbb, …

🐳 Static Build

Build a fully static binary (no libc, no cgo) using Docker:

./build.sh

The output ./pal binary runs on any Linux x86_64 β€” drop it anywhere and it works.


πŸ“ Project Structure

pal/
β”œβ”€β”€ main.go              CLI β€” commands, filters, usage
β”œβ”€β”€ palette.go           embedded palettes β€” parse, validate, search, suggest
β”œβ”€β”€ term.go              terminal output β€” OSC sequences, tmux, preview, export
β”œβ”€β”€ save.go              `pal save` β€” write a theme into the shell's rc file
β”œβ”€β”€ pick.go              `pal pick` β€” the interactive picker
β”œβ”€β”€ *_test.go            tests (every embedded palette is checked)
β”œβ”€β”€ go.mod               module: github.com/binRick/pal
β”œβ”€β”€ install.sh           One-line installer (macOS, Linux, Git Bash)
β”œβ”€β”€ install.ps1          One-line installer (Windows PowerShell)
β”œβ”€β”€ build.sh             Docker static build script
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ banner.svg       Hero banner
β”‚   β”œβ”€β”€ *.gif            Demo recordings (switch, pick, browse, save)
β”‚   β”œβ”€β”€ video.png        Poster for the YouTube demo
β”‚   └── palettes.svg     Palette showcase grid
└── palettes/
    β”œβ”€β”€ paleta/          169 paleta-format themes
    └── kfc/dark/        252 kfc-format themes (one name shared with paleta)

πŸ™ Credits

Palette data sourced from binRick/c_palettes, a C-based terminal palette manager with an extensive collection of curated themes.


Built with Go Β· OSC escape sequences Β· //go:embed

Code Statistics

pie showData
    title Code by language
    "Go" : 2016
    "Markdown" : 267
    "YAML" : 191
    "SVG" : 159
    "Shell" : 89
    "Other" : 48
Loading
Language Files Lines Blanks Comments Code Complexity
Go 8 2,339 160 163 2,016 623
Markdown 2 362 95 0 267 0
SVG 2 213 26 28 159 0
Shell 2 117 17 11 89 15
YAML 2 232 39 2 191 0
License 1 21 4 0 17 0
Powershell 1 43 5 7 31 19
Total 18 3,327 346 211 2,770 657
  • Estimated Cost to Develop (organic): $78,740
  • Estimated Schedule Effort (organic): 5.24 months
  • Estimated People Required (organic): 1.34
  • Processed: 107,191 bytes (0.107 megabytes)

Generated with scc on 2026-11-17

About

Terminal Pallete Manager

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages