Skip to content

Enhancement: Now Playing color that keeps the cover's hue #161

Closed

Description

@jonasevcik

What would you like?

A different way to pick the color Now Playing takes from the cover, so that every cover gets a color that looks like the cover, and none falls back to the neutral white.

Today accent_from_rgba (crates/reborn-ui/src/art.rs) does two things that work against that:

  1. It skips every pixel darker than 25 % brightness. On a mostly dark cover (DG 307, Artificially Flavored: dark maroon ground, red lettering) or a mostly white-paper cover (DG 307, Šepoty a výkřiky: red stamps on about 1.5 % of the picture) too little is left, and the result is the neutral white.
  2. It pushes whatever it picks to saturation 0.5 or more and brightness 0.9 or more. A muted brown cover (Mike Oldfield, Boxed) comes out as a loud orange.

On my library of 55 albums the current code gives the neutral white for 17 of them (31 %). Of the 38 that do get a color, 27 are orange or red.

Proposal, the way Android's Palette library starts out: cut the cover into 16 color swatches (median cut). The swatch that covers most of the picture in a real color wins, weighted a little by how colorful it is; gray, near-black and near-white swatches do not count. Its hue and saturation are kept and only its lightness is raised, as far as needed for text in it to have 4.5:1 contrast on the background. If every swatch is neutral, a vivid area covering at least 1 % of the picture is used (the red stamps). Only a picture with none still gets the neutral white.

On the same 55 albums:

neutral white orange red blue yellow pink green
current 17 16 11 5 3 2 1
proposed 2 13 25 10 2 2 1
comparison-sheet

Why?

Now Playing is the screen the player shows most of the time, and the cover is what makes it different from one album to the next. Falling back to "no color" for almost a third of the albums makes the screen look the same whatever is playing. A color that matches the cover makes the screen feel made for that album, and that is what makes the player stand out. The change aims at what a person sees in the cover: its dominant color area, at its own saturation, made readable.

Cost and checks: the color step runs once per track change and takes 4 to 7 ms on the player. There are unit tests for dark ground with small lettering, white paper with a small colored area, muted brown staying brown, a large blue area against a small gold one, gray/black/white/empty images, and 4.5:1 contrast for every hue. cargo fmt, clippy (no warning), cargo test --workspace and the code-quality ratchet pass.

Where would you look for it?

Nowhere new: Now Playing, the Home cover card and the accent skins already use cover_accent(). No new setting.

Version: 1.0.0-beta.9.3.32

The change is one commit (a new accent.rs; accent_from_rgba keeps its signature, so both call sites are untouched): https://github.com/jonasevcik/Y2Reborn/tree/cover-accent-palette. I can open it as a PR if the direction is acceptable.

Activity

  1. github-actions commented on Nov 19, 2026

    @github-actions

    Thanks for writing in! These earlier issues look similar. This is an automatic hint, so it may be wrong:

    If one of them is the same thing, please add your comment there and close this one. Ideas that were asked before and won't be built are listed in this page.

  2. jonasevcik commented on Nov 19, 2026

    @jonasevcik
    ContributorAuthor

    Thanks for writing in! These earlier issues look similar. This is an automatic hint, so it may be wrong:

    If one of them is the same thing, please add your comment there and close this one. Ideas that were asked before and won't be built are listed in this page.

    This assessment is wrong. This post is about enhancing the current functionality.

  3. SchulzCode commented on Nov 19, 2026

    @SchulzCode
    Owner

    Thanks a lot, jonasevcik! I took your commit from the cover-accent-palette branch as it was (you're its author in the history). It's out in Beta 9.3.35. The comparison over your 55 albums made the case very clearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions