简体   繁体   中英

Dynamically change background_color in web manifest

So I have an application that allows users to toggle between light and dark mode. I would like to set the background_color accordingly when users toggle the theme mode.

For theme_color , I can dynamically set the meta tag and put a placeholder value in the manifest.json . But as far as I know, there isn't a meta data for background_color

关于如何支持明暗模式的标准的讨论

About IOS part. It's hard code in index.html, So can't changed dynamic.

  • first line define app-icon img path
<meta name="msapplication-TileImage" content="<path of Icon>">
<meta name="msapplication-TileColor" content="#000000">
  • second line define the background-color of app-icon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM