Dark mode lovers have already been rejoicing in the upcoming release of Chrome for Android’s own version of dark mode, since we demonstrated an early version in Chrome 73 beta. In that demo, it was only Chrome’s own UI that was being darkened, but Google has bigger ambitions for its web browser’s dark mode on Android. A new code change indicates that Chrome for Android will recolor web pages themselves when using the browser’s upcoming dark mode.
Between the inclusion of dark mode in a wide variety of Google apps and the addition of a system-wide dark mode in Android Q, including automatically darkening apps that don’t have their own built-in dark mode, it’s clear that dark mode is a high priority for Google this year.
One of the most highly anticipated apps to get dark mode is definitely Chrome for Android. When we first discussed Chrome for Android’s Incognito-inspired design for dark mode, which only altered the browser’s own interface, readers drew a comparison to Samsung Internet’s “Night Mode.”
Available for over a year now, Night Mode takes your favorite websites and alters them to be darker and thus easier on the eyes. Chrome for Android may be employing a similar strategy for its own dark mode, according to a new code change posted tonight to Chromium’s Gerrit source code management.
The change adds a new Chrome flag, #enable-android-web-contents-dark-mode, whose name alone makes its purpose fairly clear. Digging deeper, we can see a little bit of what the new flag will actually do.
When the flag is enabled, a preference is toggled in Blink, Chrome’s underlying engine, called “force_dark_mode_enabled”. This preference, under the hood, tells Blink whether or not to use some of its built-in “high contrast” settings. These high contrast settings should simply change the colors of some aspects of web pages, and because they’re commonly used for accessibility purposes, they’re designed to not affect performance.
Interestingly, Blink’s dark mode setting is a recent addition that was created earlier this month to help Android’s built-in WebView browser respect Android Pie’s “night mode” developer setting. That means both Chrome for Android and WebView will soon both be able to darken web pages when in their respective dark modes.
Chrome’s experimental new dark mode for the web should arrive first on Chrome Canary in the coming days. As for Android WebView, we may not see that arrive in WebView beta for a few more weeks, likely in version 74.