Shape your terminal theme in real time
- Elegant built-in themes
- Semantic color keys (
red,blue,green, etc.) - RGB or hex color input
- Safe environment detection (TTY / CI /
NO_COLOR)
npm i -g termpalOpen interactive picker (applies theme to the current terminal session only):
termpalInstall auto-apply into your shell profile:
termpal installRemove auto-apply from your shell profile:
termpal uninstallnpm i termpalimport { termpal } from 'termpal'
termpal.use('Catppuccin')CatppuccinDraculaTokyoNightNordOneDarkGruvboxSolarizedDarkMonokaiProMonokaiDimmedGitHubDarkAyuDarkKanagawa
import { termpal } from 'termpal'
termpal.set({
red: '#f38ba8',
green: '#a6e3a1',
yellow: [255, 200, 0],
})blackredgreenyellowbluemagentacyanwhitegrayredBrightgreenBrightyellowBrightblueBrightmagentaBrightcyanBrightwhiteBright
import { termpal } from 'termpal'
termpal.reset()The library automatically disables itself when the terminal environment is unsuitable.
It will not send OSC sequences if:
- output is not a TTY
- running in CI
- the
NO_COLORenvironment variable is set
The library sends the OSC 4 escape sequence:
ESC ] 4 ; index ; color BEL
Example:
ESC ] 4 ; 1 ; #f38ba8 BEL
This instructs the terminal to change palette slot 1 (red).
OSC palette modification is supported by many modern terminals including:
- iTerm2
- kitty
- WezTerm
- xterm
- Windows Terminal
Support may vary across terminals.
MIT