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

Currently, in a web manifest file, you can define a theme color. 
https://www.w3.org/TR/appmanifest/#theme_color-member
For example:
```
{
    "lang": "en",
    "short_name": "Resilience",
    "name": "Resilient Web Design by Jeremy Keith",
    "description": "A web book in seven chapters on the past, present, and future of web design. By Jeremy Keith.",
    "background_color": "#5f7995",
    **"theme_color": "#5f7995"**
}
```

There's not currently any way to express that a certain theme color should be used for light mode, while another is used for dark mode. 

In HTML, there's currently a proposal to add support for color schemes by adding a media attribute to the meta tag:
https://github.com/whatwg/html/issues/6495
```
<meta name="theme-color" media="(prefers-color-scheme: light)" content="red">
<meta name="theme-color" media="(prefers-color-scheme: dark)"  content="darkred">
```

It would be great to be able to do a similar thing in the web manifest file. 

-- 
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

Received on Tuesday, 4 May 2021 18:52:00 UTC