Skip to main content
Pi can create themes for you. Just ask it to build one for your setup.
Themes are JSON files that define colors for the TUI (Terminal User Interface). Pi supports 24-bit RGB colors and includes built-in dark and light themes.

Theme Locations

Pi loads themes from: Built-in:
  • dark, light
Global:
  • ~/.pi/agent/themes/*.json
Project:
  • .pi/themes/*.json
Packages:
  • themes/ directories in pi packages
  • pi.themes entries in package.json
Settings:
  • themes array with files or directories
CLI:
  • --theme <path> (repeatable)
Disable discovery with --no-themes.

Selecting a Theme

Use /settings and select your theme from the menu
On first run, Pi detects your terminal background and defaults to dark or light.

Creating a Custom Theme

1

Create File

2

Define Colors

3

Select Theme

Use /settings or edit settings.json
4

Hot Reload

Edit the active theme file - Pi reloads it automatically!
Hot reload: When you edit the currently active custom theme file, Pi reloads it automatically for immediate visual feedback.

Theme Format

Fields:
  • name - Required, must be unique
  • vars - Optional reusable colors
  • colors - Required, must define all 51 tokens
The $schema field enables editor auto-completion and validation.

Color Tokens

Every theme must define all 51 color tokens. There are no optional colors.

Core UI (11 colors)

color
Primary accent (logo, selected items, cursor)
color
Normal borders
color
Highlighted borders
color
Subtle borders (editor)
color
Success states
color
Error states
color
Warning states
color
Secondary text
color
Tertiary text
color
Default text (usually "")
color
Thinking block text

Backgrounds & Content (11 colors)

color
Selected line background
color
User message background
color
User message text
color
Extension message background
color
Extension message text
color
Extension message label
color
Tool box (pending)
color
Tool box (success)
color
Tool box (error)
color
Tool title
color
Tool output text

Markdown (10 colors)

Tool Diffs (3 colors)

Syntax Highlighting (9 colors)

Thinking Level Borders (6 colors)

Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):

Bash Mode (1 color)

color
Editor border in bash mode (! prefix)

HTML Export (optional)

The export section controls colors for /export HTML output. If omitted, colors are derived from userMessageBg.

Color Values

Four formats are supported:

256-Color Palette

  • 0-15: Basic ANSI colors (terminal-dependent)
  • 16-231: 6×6×6 RGB cube (16 + 36×R + 6×G + B where R,G,B are 0-5)
  • 232-255: Grayscale ramp

Terminal Compatibility

Pi uses 24-bit RGB colors. Most modern terminals support this:
  • iTerm2 (macOS)
  • Kitty (Linux/macOS)
  • WezTerm (cross-platform)
  • Windows Terminal
  • VS Code integrated terminal
For older terminals with only 256-color support, Pi falls back to the nearest approximation. Check truecolor support:

Theme Variables

Use vars to define reusable colors:
This makes it easy to:
  • Maintain color harmony
  • Try different base palettes
  • Update colors globally

Tips

Use established color palettes for harmony:
  • Nord
  • Gruvbox
  • Tokyo Night
  • Dracula
  • Solarized
Define them in vars and reference consistently.
Dark terminals: Use bright, saturated colors with higher contrastLight terminals: Use darker, muted colors with lower contrast
Check your theme with:
  • Different message types (user, assistant, custom)
  • All tool states (pending, success, error)
  • Markdown content (headings, code, quotes)
  • Long wrapped text
  • Thinking blocks at different levels
Select your theme, then edit the JSON file. Changes appear immediately without restarting Pi.
For best results, use colors that harmonize with your terminal’s color scheme.

VS Code Terminal

For accurate colors in VS Code, set:
This disables automatic contrast adjustment that can alter your theme colors.

Example Themes

See the built-in themes for reference:

dark.json

Built-in dark theme source

light.json

Built-in light theme source

Sharing Themes

Package themes for others:
1

Create Package

2

Add Themes

3

Publish

4

Users Install

See Pi Packages for full details.

Troubleshooting

Your terminal may not support 24-bit color. Check $COLORTERM:
If not supported, consider switching to a modern terminal.
Ensure:
  • File is in a discovered location
  • Filename ends with .json
  • JSON is valid (use the $schema for validation)
  • Theme name is unique
  • All 51 color tokens are defined
Hot reload only works for the currently active theme. If you’re editing a different theme, select it first via /settings.
Use the $schema field to enable validation in your editor:

Next Steps

Customization

Explore all customization options

Pi Packages

Package and share themes via npm or git