Re: [w3c/manifest] Add support for defining a theme color for both light & dark modes (prefers color scheme) (#975)

dmurph left a comment (w3c/manifest#975)

from meeting with @mkruisselbrink:
> With our flat list, we have to look at all of the things at the same time and it's confusing for developers how this works, wereas the webextensions version allows us to look for a matching entry first, and then choose an appropriate size. So, for example, there could be only one entry for "dark_color_scheme", and then all of that same icon will be in that entry. In the manifest icon list, each icon is it's own icon entry, so each would have to have that scheme.

Our method works but it's kinda hard to read and the algorithm is weirder. The schema is nicer to understand "first, choose the entry that matches your NON-size constraints. Then, choose an icon size that you want"

The main question for dev-facing changes here is - do we use a new format, or an old format with a scheme (and maybe lang). I guess localization is a question here too. Do others have thoughts? Favorites? I'll throw out that my favorite is maybe option ii), where we do the new format, and the spec turns into the old format to make it easier to initially do.

The only extra thing we need to do probably is specify the order in which the filters are supplied. e.g.:
```
{
"lang": "en",
  "icons": [
    // French
    {
      "512": "fr-512.png",
      "192": "fr-192.png",
      "32": "fr-32.png",
      "lang": ["fr"]
      "purpose": ["any"]
    },

    // Dark
    {
      "512": "dark-512.png",
      "192": "dark-192.png",
      "32": "dark-32.png",
      "purpose": ["any"]
      "color_schemes": ["dark"]
    },
    // Legacy
....
  ]
}

```

If we are french and also dark mode, we can't get both of those constraints. So which constraint do we drop first? We would jsut want to order them, likely, 1. color_schemes, 2. lang. So we would choose the default dark mode icon, even though it is not french.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/975#issuecomment-3856671033
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/issues/975/3856671033@github.com>

Received on Thursday, 5 February 2026 22:27:49 UTC