claude-code - 💡(How to fix) Fix Allow persistent prompt bar color via setting, flag, or hook output [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49293Fetched 2026-04-17 08:45:22
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1

/color <name> changes the prompt bar color for the current session only. There's no way to set it automatically on launch.

Root Cause

/color <name> changes the prompt bar color for the current session only. There's no way to set it automatically on launch.

Fix Action

Fix / Workaround

Current workarounds

None clean — /color isn't writable from hooks, Claude can't invoke slash commands, and there's no persistent field. Best current option is glancing at the status line and typing /color <name> each session.

RAW_BUFFERClick to expand / collapse

Summary

/color <name> changes the prompt bar color for the current session only. There's no way to set it automatically on launch.

Motivation

I use a SessionStart hook that assigns each session a random color + planet name (e.g. "magenta Jupiter") shown in my status line. I'd like the prompt bar to match so the session's color identity is visible in both places without typing /color magenta manually every launch.

Proposed options (any one would solve this)

  1. A color field in settings.json (user or project scope) read at startup.
  2. A --color <name> CLI flag.
  3. A hookSpecificOutput.color field that SessionStart hooks can emit.
  4. An env var like CLAUDE_PROMPT_COLOR honored at launch.

Current workarounds

None clean — /color isn't writable from hooks, Claude can't invoke slash commands, and there's no persistent field. Best current option is glancing at the status line and typing /color <name> each session.

Environment

Claude Code on Windows 11, shell: bash.

extent analysis

TL;DR

Implementing a color field in settings.json or a --color <name> CLI flag could allow for automatic prompt bar color setting on launch.

Guidance

  • Consider adding a color field to settings.json to store the desired prompt bar color, which can be read at startup.
  • Evaluate the feasibility of introducing a --color <name> CLI flag to set the prompt bar color when launching the application.
  • Investigate the possibility of utilizing environment variables, such as CLAUDE_PROMPT_COLOR, to set the prompt bar color.
  • Assess the potential of modifying the SessionStart hook to emit a hookSpecificOutput.color field, if the application's architecture supports it.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution may depend on the application's architecture and the feasibility of implementing the proposed options. It is essential to consider the trade-offs and potential complexities of each approach.

Recommendation

Apply a workaround by introducing a color field in settings.json or a --color <name> CLI flag, as these options seem to be the most straightforward and user-friendly solutions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING