Suggest dark mode background for pwa web manifest

pwas launch way too bright on android with dark theme. to the point where it is annoying to launch. if the device theme is dark, your manifest ought to declare the pwa as dark.

Welcome to Discourse @urandom. I was not aware that Mojeek had a distinct progressive web app. However, there is a search preference for a dark mode. I’m not sure if it is officially documented.

Settings > Theme > Dark

theme_color #

The theme_color sets the color of the tool bar, and may be reflected in the app’s preview in task switchers. The theme_color should match the meta theme color specified in your document head.

As of Chromium 93 and Safari 15, you can adjust this color based on a media query with the media attribute of the meta theme color element. The first one that matches will be picked. For example, you could have one color for light mode and another one for dark mode. At the time of writing, you can’t define those in your manifest. See w3c/manifest#975 GitHub issue.

<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)"  content="black">

So there is a way to detect the device’s theme. But I’m not sure how that would translate into the cookie which controls the white background.

Maybe @Tom can shed light on this issue.

Hello @urandom. We don’t have a progressive web app. It requires a manifest.json file and that is something we do not have. If you use the chrome lighthouse tool it also mentions that we do not meet the requirements for this.

As @mike mentioned, we have a settings page where you can set darkmode: Search Settings - Mojeek and we don’t use the theme-color meta tag either.

If you are referring to our app. You are correct that it currently does not have a way to launch in dark mode. This is something that we would hopefully be adding in the future.