Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme specific branding colors #2140

Open
razzeee opened this issue Apr 3, 2024 · 2 comments
Open

Theme specific branding colors #2140

razzeee opened this issue Apr 3, 2024 · 2 comments
Labels
Good First Issue Small, self-contained issue. Good for newcomers, and/or should be an easy fix. Status: Confirmed Verified by someone other than the reporter

Comments

@razzeee
Copy link

razzeee commented Apr 3, 2024

Problem

It seems like appcenter will always take the branding color without a scheme

color_primary = branding.get_color (AppStream.ColorKind.PRIMARY, AppStream.ColorSchemeKind.UNKNOWN);

(I might just no be understanding vala)

Flathub apps will almost always have a scheme_preference that should be read instead. Those will look similar to the spec https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-branding

    <branding>
      <color type="primary" scheme_preference="light">#ff00ff</color>
      <color type="primary" scheme_preference="dark">#993d3d</color>
    </branding>

But you would also need to handle

    <branding>
      <color type="primary" scheme_preference="light">#ff00ff</color>
      <color type="primary">#993d3d</color>
    </branding>

And this one, that's probably already working

    <branding>
      <color type="primary">#993d3d</color>
    </branding>

If this is not done, we might run into comparability problems.

For e.g. we had an app with the following (kinda nonsensical definition)

<branding>
    <color type="primary">#f9c440</color>
    <color type="primary" scheme_preference="light">#d48e15</color>
    <color type="primary" scheme_preference="dark">#ffe16b</color>
  </branding>

Presumably cause they wanted it to work in flathub and appcenter.

ryonakano/konbucase#128 (comment)

Proposal

Parse all branding colors from appstream including the scheme_preference

Prior Art (Optional)

No response

@danirabbit danirabbit added Status: Confirmed Verified by someone other than the reporter Good First Issue Small, self-contained issue. Good for newcomers, and/or should be an easy fix. labels May 14, 2024
@ausdauerer
Copy link

Hey, can i work on this issue? Thanks

@danirabbit
Copy link
Member

@ausdauerer feel free to propose a branch! Thanks 🩷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Small, self-contained issue. Good for newcomers, and/or should be an easy fix. Status: Confirmed Verified by someone other than the reporter
Projects
None yet
Development

No branches or pull requests

3 participants