Contact emailsfut...@chromium.org,
p...@chromium.org,
pe...@chromium.orgSpechttps://drafts.csswg.org/css-color-adjust/#color-scheme-propSummaryThis Origin Trial covers two pieces of related functionality:
First, websites that decide to participate in this trial will have their appearance algorithmically adjusted to be darkened, and thus appropriate for display whilst a device is in Dark Mode. Rendered colors will have their lightness adjusted to appear dark, and images will be classified, where images will be classified first based on their size and properties, then by a machine learning model to help distinguish iconography from photos and other images.
Second, support for the CSS color-scheme “only” keyword, which forbids the user agent from overriding the color scheme for an element. This enables participating websites to manually touch-up certain elements when the algorithm gets it wrong, which will happen.
Goals for experimentationModern operating systems, particularly mobile ones, feature extensive, platform-wide Dark Mode implementations. Dark Mode is the default, out-of-the-box experience on some Android devices, and automatically enabled during nighttime on many more.
Early data is suggesting that dark themes use 10% less battery than light themes at 75% brightness, and suggest significant differences in user behaviour on websites that don’t provide a dark mode whilst the user’s device is in dark mode.
However, we heard feedback from developers that one of the reasons why dark themes haven’t been more widely adopted on the web is the cost of creating and maintaining a second theme for web applications.
With this Origin Trial for Auto Dark Mode, we’d like to experiment with both partners and developers to understand the impact of Dark Mode on their websites, and to understand the quality of our algorithms outside of our own testing environment.
Experimental timelineThe experiment will start in M96, and will last until (& including M99). Auto Dark Mode is already programmatically detectable by developers to inspect the computed styles, but we might want to iterate during the Origin Trial with an addition if the CSS working group agrees on one:
https://github.com/w3c/csswg-drafts/issues/6664Any risks when the experiment finishes?No, websites will revert back to their original appearance.
Ongoing technical constraintsAuto Dark Mode in particular is a fairly intrusive feature, but builds upon the force dark mode feature already launched for Android WebView.
DebuggabilityDevelopers already have the ability to test this functionality on their pages by opening DevTools, selecting the Rendering option in "More tools", and then emulating Auto Dark Mode.
Users and developers alike have the ability to enable this functionality for all websites through a flag which can be found on chrome://flags/#enable-force-dark.
Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?The Origin Trial will be available for Android only.
There are no strict technical reasons for this, but given that the functionality is most appropriate for mobile devices, there might be different considerations between mobile and desktop, and that the team is currently focused on improving the Android experience, we’d like to begin there.
Link to entry on the feature dashboardhttps://chromestatus.com/feature/5672533924773888