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

For `"icons"`, which we deal with in https://github.com/w3c/image-resource/issues/26, it seems like @aarongustafson's [proposal](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ImageResource-color_scheme/explainer.md) is the latest and greatest.

It would be great to align the two proposals. From what I can tell, `ImageResource` icons are used in the `"icons"` member, but also nested in the [`"shortcuts"`](https://web.dev/app-shortcuts/#define-app-shortcuts-in-the-web-app-manifest) member. 

Combined, this would look like in the example below. There's some duplication with the `"shortcuts"`, but I think it's tolerable. 

```json
{
 "media_overrides": {

  "(prefers-color-scheme: dark)": {
   "theme_color": "#fff",
   "background_color": "#000",

   "icons": [{
    "src": "/icons/icon-dark.png",
    "sizes": "192x192"
   }],

   "shortcuts": [{
    "name": "Play",
    "short_name": "Play",
    "description": "Play the list of podcasts",
    "url": "/play?utm_source=homescreen",
    "icons": [{
     "src": "/icons/play-dark.png",
     "sizes": "192x192"
    }]
   }]
  },

  "(prefers-color-scheme: light)": {
   "theme_color": "#000",
   "background_color": "#fff",

   "icons": [{
    "src": "/icons/icon-light.png",
    "sizes": "192x192"
   }],

   "shortcuts": [{
    "name": "Play",
    "short_name": "Play",
    "description": "Play the list of podcasts",
    "url": "/play?utm_source=homescreen",
    "icons": [{
     "src": "/icons/play-light.png",
     "sizes": "192x192"
    }]
   }]
  }
 }
}
```


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

Received on Tuesday, 1 June 2021 10:56:20 UTC