[w3c/manifest] Themed/colored icons for web apps (Issue #1091)

Android 12/13 has introduced a new kind of icons, called themed icons, that change their colors depending on the wallpaper's main color:

> Starting with Android 13, you can opt in to themed app icons. With this feature, app icons in supported Android launchers are tinted to inherit the coloring of the user’s chosen wallpaper and other themes. ([source](https://developer.android.com/about/versions/13/features#themed-app-icons), [source](https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#user-theming))

This somewhat extends maskable that are already supported in web app manifests and implemented in most Android browsers. However, it appears that such fully-themed icons are currently not supported for web apps (or at least not documented anywhere I could find). I propose that this feature should be added, but there are some things that need to be cleared on how exactly this should be implemented.

Themed icons appear to be like a combination of "maskable" and "monochrome" icons, already supported by the web app manifest. Because of this, it might seem like an easy solution to let browsers use any icon that has both "maskable" and "monochrome" purposes specified as a themed icon. However, there is currently no way of specifying that a specific icon can only be used for both of those purposes together:

> If an icon contains multiple purposes, it could be used for any of those purposes. ([source](https://www.w3.org/TR/appmanifest/#purpose-member))

This means that, if a web app specifies an icon with both purposes, the browser could also incorrectly (in terms of UX, but correctly according to the specification) use that icon as a normal maskable icon (which would cause a monochrome icon to be displayed where a colored one should be), or as a normal monochrome icon (which would cause it to be displayed without any mask).

So, to solve this problem, there seem to be two solutions. One is to create another icon purpose (for example, "themed"), used only for such themed/colored icons. Another is to add a new syntax to the "purpose" field of the manifest which would allow specifying that both icon contexts must be satisfied in order to use that icon. For example, "maskable-monochrome", which the browser would then interpret and install as a themed/colored icon.

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

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

Received on Wednesday, 24 May 2023 18:44:41 UTC