/
/
# What does this implement/fix?
Makes the current track's artwork color palette available to MilkDrop
visualizer viewers, so the frontend can tint the visualizer toward the
album color.
The tap already registers as an in-process Sendspin client for the
waveform (the same bridge pattern the Hue Lights Sync plugin uses); this
adds the existing `color@_bridge` role to that registration, caches the
latest color@v1 fields on the tap, and forwards them to browser viewers
over the relay WebSocket as a new `{"type": "color", ...}` text message.
A viewer that attaches mid-track gets the current palette replayed on
connect. The color cache is deliberately not reset on `stream/clear`,
since that also fires on a plain seek; the server pushes an explicit
all-null color update when the palette itself goes away.
The feature is controlled by a new `color_tint` advanced config option
on the provider, enabled by default. When disabled, the tap does not
register the color role at all and no color data reaches any viewer.
**Related issue (if applicable):**
- n/a
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix`
- [ ] New feature (non-breaking change which adds functionality) —
`new-feature`
- [x] Enhancement to an existing feature — `enhancement`
- [ ] New music/player/metadata/plugin provider — `new-provider`
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected) — `breaking-change`
- [ ] Refactor (no behaviour change) — `refactor`
- [ ] Documentation only — `documentation`
- [ ] Maintenance / chore — `maintenance`
- [ ] CI / workflow change — `ci`
- [ ] Dependencies bump — `dependencies`
## Checklist
- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
- [ ] For changes to shared models, the companion PR in
`music-assistant/models` is linked.
- [x] For changes affecting the UI, the companion PR in
`music-assistant/frontend` is linked:
https://github.com/music-assistant/frontend/pull/2577
- [x] I have read and complied with the project's [AI
Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md)
for any AI-assisted contributions.
- [ ] I have [raised a PR against the documentation
repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md)
targeting the main or beta branch as appropriate.
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>