crabidy/cbd-tui
Test User 430c87451b tui: make the spectrum color configurable
The bars were hardcoded to `COLOR_PRIMARY`, the same muted blue as the pane
borders, so the one moving thing on screen read as chrome.

`spectrum_color` in the client config now picks it, parsed by ratatui's
`Color: FromStr`: a `#rrggbb` triple, a color name, or a 0-255 palette index,
the latter two deferring to the terminal theme. It defaults to `COLOR_RED` —
the red the queue marks the playing track with — so the two agree on what
"now" looks like.

The default lives twice, as `COLOR_RED` for the renderer and `COLOR_RED_HEX`
for the config file, one being a `Color` and the other a string a user edits.
`the_default_spectrum_color_is_the_queue_red` stops them drifting.

A config file is user input, so an unparsable value warns on stderr and falls
back to the red instead of failing. It resolves in `run`, before the alternate
screen is entered, or the warning would be drawn over and lost.

Existing config files predate the key: they keep working and take the default,
since every field of the `ClapSerde` opt struct is optional.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 09:43:21 +02:00
..
src tui: make the spectrum color configurable 2026-07-27 09:43:21 +02:00
Cargo.lock Add cbd-tui 2023-05-17 19:08:48 +02:00
Cargo.toml build: put every provider, opus, and the spectrum behind cargo features 2026-07-25 03:15:32 +02:00
build.rs Implement the comprehensive CLI (stage 5) 2026-07-22 12:13:51 +02:00
schema.graphql Add cbd-tui 2023-05-17 19:08:48 +02:00