A bug has been reported in Discourse where the theme-color meta attribute uses the default theme’s color instead of the active theme’s color. gkln and david have both experienced this issue, which affects the styling of tabs in Chrome on Android. The bug has been present since the introduction of user-selectable themes. Osama has created a fix, which includes updating the theme-color meta attribute to use the active theme’s color scheme. Additionally, Osama has also updated the manifest.webmanifest file to match the theme-color meta attribute, as recommended by Google.
When users select another theme in their settings, the meta attribute theme-color is still set to the header_background property of the default theme. It should be set to the value of the active theme instead.
The theme-color tag is used by Chrome on android to style tabs according to the website’s color scheme.
As @gkln said, this seem to have stopped working properly for Discourse sites. Looking at the code, I’m not sure if/how it ever fetched colors from a non-default theme, but it can’t be a coincidence that two separate people have reported it . @osama maybe something related to the recent theme changes?
The theme-color meta attribute always used the site’s default color scheme instead of the scheme of the current user theme. We’ve had this bug since the inception of user-selectable themes. Here is a fix for it:
Yep, looks like Google docs recommend the colors in theme-color meta attr and the manifest file match, so I updated my PR so that the manifest file uses the same colors.