{"slug": "claude-code-colorizer", "title": "Claude Code Colorizer", "summary": "Developer cjodo released claude-colorizer, a dependency-free Go tool that renders color literals from Claude Code conversations as live statusline swatches and changes terminal tab and background colors across working, needs-you, and done/error states. The tool parses #rgb, #rrggbb(aa), rgb()/rgba(), hsl()/hsla(), and oklch() values, requires Go 1.22+ and Claude Code, and installs via `make install`, which runs `go install` and adds the statusline and hooks to ~/.claude/settings.json. Ghostty is the most tested terminal; Kitty and WezTerm tab colors require extra terminal configuration, and tmux tab colors need `set -g allow-passthrough on`.", "body_md": "Color visualization for Claude Code, in the spirit of\n[nvim-colorizer](https://github.com/NvChad/nvim-colorizer.lua). Written in Go\nwith no dependencies.\n\n- **Statusline swatches.** Colors mentioned in the conversation (Claude's\nreplies, code it writes, your prompts) appear as live swatches under the\nprompt. It reads`#rgb` ,`#rrggbb(aa)` ,`rgb()/rgba()` ,`hsl()/hsla()` and`oklch()` .\n- **State colors.** The terminal tab and background tint change as the\nsession moves through*working → needs you → done / error* .\n- **`show` / `try`.** Highlight color literals in any file\n(`claude-colorizer show styles.css` ), or preview a color as your terminal\nbackground (`claude-colorizer try '#1e1e2e'` ).\n\nGhostty is the most tested terminal: it's the one claude-colorizer is\ndeveloped in. The other drivers follow each terminal's documented escape\nsequences and have unit tests, but see less real use. If you use one of\nthem, see [CONTRIBUTING.md](https://github.com/cjodo/claude-colorizer/blob/main/CONTRIBUTING.md) for a short test checklist and\nhow to report results or add a terminal.\n\n| Terminal | Tab color | Background tint | Title fallback | \n|---|---|---|---|\n| Kitty | ✅ remote control¹ | ✅ OSC 11 | — | \n| Ghostty | — (no escape exists) | ✅ OSC 11 | ✅ glyph | \n| WezTerm | ✅ user var + Lua² | ✅ OSC 11 | — | \n| iTerm2 | ✅ OSC 6 | ✅ OSC 1337 | — | \n| Warp | — | — | ✅ glyph | \n| Alacritty | — (no tabs) | ✅ OSC 11 | ✅ glyph | \n| Windows Terminal | — | ✅ OSC 11 | ✅ glyph | \n| other xterm-like | — | ✅ OSC 11 | ✅ glyph | \n\nStatusline swatches use 24-bit SGR colors, which work in all of them.\n\nEach terminal is a driver implementing `terminal.Terminal`\n(`internal/terminal/drivers.go`). Detection reads environment variables\n(`internal/terminal/detect.go`). Inside tmux it asks tmux which terminal\neach client tty attached to the session is running instead, because the\nenvironment describes the terminal that started the tmux server. If\ndifferent terminals are attached, tab colors are sent to all of them. To override detection, set\n`CLAUDE_COLORIZER_TERMINAL=kitty|ghostty|wezterm|iterm2|warp|alacritty|windows-terminal|generic`.\nRun `claude-colorizer detect` to see what was picked.\n\n¹ **Kitty**: add `allow_remote_control yes` to `kitty.conf` (or `socket-only`\nplus `listen_on`). Without it, kitty ignores the tab color and only the\nbackground changes.\n\n² **WezTerm**: the color is published as the user var `claude_colorizer_tab`.\nTo paint the tab, add this to `wezterm.lua`:\n\n```\nwezterm.on('format-tab-title', function(tab)\n  local c = tab.active_pane.user_vars.claude_colorizer_tab\n  if c and c ~= '' then\n    return { { Background = { Color = c } }, { Foreground = { Color = '#000000' } },\n             { Text = ' ' .. tab.active_pane.title .. ' ' } }\n  end\nend)\n```\n\n**tmux**: background tint and title work without any setup; tmux applies\nthem to the pane. Tab colors (kitty, iTerm2, WezTerm) have to reach the outer\nterminal, so they need `set -g allow-passthrough on`. They are wrapped\nautomatically when `$TMUX` is set.\n\n**Title fallback**: Claude Code sets the terminal title itself and may\noverwrite the glyph. If your version supports\n`CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1`, set it. If you don't want the glyph,\nset `\"title\": false`.\n\nYou need Go 1.22+ and Claude Code.\n\n```\ngit clone <this repo> && cd claude-colorizer\nmake install\n```\n\nThat's the whole setup. `make install` does two things:\n\n1. Runs `go install` , which builds the binary into`$(go env GOPATH)/bin` .\n2. Runs `claude-colorizer install` , which adds the statusline and all hooks to`~/.claude/settings.json` using the binary's**absolute path** , so it\ndoesn't matter whether that directory is on your`$PATH` .\n\nRestart Claude Code, then try it: ask Claude for a palette and the swatches appear under the prompt. The tab or background changes while it works.\n\nTab colors in Kitty and WezTerm need one extra piece of terminal config. See\n[Terminal support](#terminal-support).\n\n- **Backup:** the previous file is saved as`settings.json.bak` . If`settings.json` isn't valid JSON (for example, it has comments), install\nrefuses to touch it.\n- **Your existing statusline is kept:** it's chained, so its output renders\non the line above the swatches.`uninstall` puts it back exactly.\n- **Hooks:** they are appended next to any hooks you already have, never\nreplacing them. Running`install` again doesn't add duplicates.\n- **Key order:** keys in`settings.json` are rewritten in alphabetical order.\n\nPreview the changes first with `claude-colorizer install --dry-run`.\n\n| Flag | Effect | \n|---|---|\n| `--dry-run` | Print the changes without writing | \n| `--no-hooks` | Statusline only (or use this if you installed the plugin) | \n| `--no-statusline` | State colors only | \n| `--settings PATH` | Edit another file, e.g. `.claude/settings.json` in a project | \n\nPass flags through make with `make install ARGS=\"--no-statusline\"`.\n\n```\nmake uninstall        # or: claude-colorizer uninstall\n```\n\nThis removes only the entries it added, restores a chained statusline, and deletes the binary.\n\nThe repo is also a plugin marketplace. The plugin only provides the hooks, because plugins can't set a statusline:\n\n```\n/plugin marketplace add /path/to/claude-colorizer\n/plugin install claude-colorizer@claude-colorizer\n```\n\nThen run `claude-colorizer install --no-hooks` to add the statusline without\nregistering the hooks twice. To try it for a single session without installing,\nrun `claude --plugin-dir /path/to/claude-colorizer`.\n\nThe tab, background tint and title glyph show what the session is doing, so you can tell from another tab or window whether Claude needs you.\n\n| Color | Glyph | State | Meaning | \n|---|---|---|---|\n| Blue | 🔵 | working | Claude is working: thinking, writing, running tools. Nothing for you to do yet. | \n| Amber | 🟡 | attention | Claude is waiting on you: a permission prompt, or it has sat idle waiting for input. | \n| Green | 🟢 | done | Claude finished its turn. Read the reply and send the next prompt. | \n| Red | 🔴 | error | Something failed: the API request errored, or a tool call failed. | \n| Your defaults | none | reset | The session just started or ended. | \n\nRed after a failed tool call doesn't always mean the turn is over. Claude often recovers, and the color goes back to blue on its next successful tool call. Red after an API error stays until you send another prompt.\n\nThe glyph is a fallback for terminals that can't color their tabs. It appears\nat the start of the window title. See the Title fallback column in\n[Terminal support](#terminal-support).\n\n| Hook event | State | Default tab / tint | \n|---|---|---|\n| `UserPromptSubmit` ,`PostToolUse` | working | `#3b82f6` /`#151b2b` | \n| `Notification` (permission, idle) | attention | `#f59e0b` /`#2a2112` | \n| `Stop` | done | `#22c55e` /`#13231a` | \n| `StopFailure` ,`PostToolUseFailure` | error | `#ef4444` /`#2b1515` | \n| `SessionStart` ,`SessionEnd` | reset | terminal defaults | \n\nTo change any color or glyph, see [Configuration](#configuration).\n\n`~/.config/claude-colorizer/config.json` (or `$CLAUDE_COLORIZER_CONFIG`). Every\nkey is optional and is layered over the defaults. Run `claude-colorizer config`\nto print the effective config.\n\n```\n{\n  \"tab\": true,\n  \"background\": true,\n  \"title\": true,\n  \"states\": {\n    \"working\": { \"tab\": \"#7c3aed\", \"background\": \"#1a1426\" },\n    \"done\":    { \"background\": \"#eef9f0\" }\n  },\n  \"statusline\": {\n    \"max\": 12,\n    \"sources\": [\"assistant\", \"tools\", \"user\"],\n    \"label\": \"hex\",\n    \"prefix\": \"🎨 \",\n    \"empty\": \"\"\n  }\n}\n```\n\nThe default background tints assume a dark theme. On a light theme, set\nlight `background` values, or set `\"background\": false`.\n\n```\nmake test     # go vet + unit tests (parser, drivers, detection, transcript)\nmake cross    # linux/darwin/windows binaries in dist/\n```\n\nSee [CONTRIBUTING.md](https://github.com/cjodo/claude-colorizer/blob/main/CONTRIBUTING.md) for testing on a terminal and adding\na new one.", "url": "https://wpnews.pro/news/claude-code-colorizer", "canonical_source": "https://github.com/cjodo/claude-colorizer", "published_at": "2026-10-08 21:31:56+00:00", "updated_at": "2026-10-08 21:47:26.534164+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-products"], "entities": ["Claude Code", "claude-colorizer", "cjodo", "Ghostty", "Kitty", "WezTerm", "iTerm2", "tmux"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/claude-code-colorizer", "markdown": "https://wpnews.pro/news/claude-code-colorizer.md", "text": "https://wpnews.pro/news/claude-code-colorizer.txt", "jsonld": "https://wpnews.pro/news/claude-code-colorizer.jsonld"}}