Better app color API
The automatic algorithm choosing banner colors is non-deterministic and produces problematic results often enough that I think we should just have every app define the color via appstream themselves. It'd be good to have a better, more standard way of doing it than the current custom tag though, so for 42 I'd like to revisit the API and ideally propose it as an appstream standard.
Current syntax:
<custom>
<value key="GnomeSoftware::key-colors">[(124, 53, 77)]</value>
</custom>
Some thoughts:
- The array of (R, G, B) colors is unintuitive, it should be a single value and use regular hex color notation IMO
- Elementary has something very similar, but they have background and foreground. In the interest of standardization should we perhaps do the same?
- Do we need a second set of colors for dark? If not, how do we deal with very bright backgrounds once we get the system-wide prefer dark setting (since the banners have a pretty large area)?
- If we allow apps to define random colors, including dark ones, and don't have a second color for foreground we'll need an automatic way for text to be light rather than dark
- Would be nice to have some kind of preview tool to test banner colors (e.g. a little app that opens the appstream XML and renders the banner)
- Apps for GNOME also uses these colors, any additional considerations from that perspective @sophie-h?
cc @pwithnall @exalm @cassidyjames
Edited by Tobias Bernard