# Themes — Liu Terminal

> Liu Terminal themes. 19 built-in color themes plus full JSON-based custom theme support with live preview.

URL: https://liu.software/docs/themes/  
Language: en  
Updated: 2026-10-17

Liu ships with 18 built-in palettes, reads up to 32 user themes from ~/.config/Liu/themes/, and can generate new ones on demand with a local AI agent.

## Create Theme with AI

Press ⌘ K → Create Theme. A dialog opens: describe the look you want and pick the local agent that should produce it. Liu autodetects Claude Code, Codex, OpenCode, Cursor Agent, Amp, Cline and Grok on PATH — whichever you already have installed.

1. Type a short brief: "warm Solarized but more saturated", "muted greens, paper feel", "high-contrast monochrome blue".
2. Pick an agent. Liu shells out to its CLI with a structured prompt.
3. The returned JSON is schema-validated, applied live and dropped into ~/.config/Liu/themes/.

This subsystem is under rewrite. The dialog state machine lives in src/main.c and the Appearance-tab entry in src/ui/settings.c; both will move once the rewrite lands.

## Pick a built-in

Open the command palette (⌘ K) and type theme. The list shows every built-in alongside user themes. Press ↵ on a row to apply; Settings → Appearance also offers a live preview grid.

## Write your own

Drop a JSON file into ~/.config/Liu/themes/. Liu loads it at startup; Create Theme also applies and saves generated themes immediately. The schema matches built-ins and AI-generated themes — list every color field explicitly (there is no "extends" inheritance yet).

## Theme JSON schema

Color values are four-number RGBA arrays in the 0–1 range. A complete export contains base colors (fg, bg, cursor, selection), ansi\_0 through ansi\_15, tab\_bg / tab\_active\_bg / tab\_active\_fg / tab\_inactive\_bg / tab\_inactive\_fg, sidebar\_bg / sidebar\_fg / sidebar\_hover / sidebar\_active, border / scrollbar / scrollbar\_thumb, status\_bg / status\_fg, ui\_accent, voice\_record and voice\_accent.

Optional scalar overrides are opacity (0 = no override), cursor\_style (1 = block, 2 = underline, 3 = bar), cursor\_blink and bold\_is\_bright. Missing tab text colors are repaired for legibility; themes do not inherit from one another.

## Color encoding

Internally Liu stores cell foreground and background as a single u32. Values 0–255 are ANSI palette indices; bit 24 (0x01RRGGBB) marks the value as 24-bit truecolor. Check with the IS\_TRUECOLOR(c) macro from src/terminal/terminal.h.

Theme files always use hex strings - the bit-packed form is an implementation detail. Truecolor is on by default.

[Next Tabs & splits →](https://liu.software/docs/tabs.md)
