Use appstream's `branding` colors
The Software computes "key colors" on the fly, but the appstream has a branding
element, which can contain information about app "main" color for light and dark theme, which can be used for these things. Prefer it, if available.
More info here:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-branding
and here:
https://docs.flathub.org/blog/introducing-app-brand-colors/