-
-
Notifications
You must be signed in to change notification settings - Fork 136
Dark Style Preference
This is a proposal for inclusion at FreeDesktop.org. An implementation is currently in progress for elementary OS and the Pantheon desktop environment. This document describes a method for desktop environments and apps to set and read a user preference for a dark style.
Heavily inspired by the draft CSS web specification.
- Cassidy James Blaede [email protected]
Users may prefer their desktop and apps to use a dark style where supported. Rather than force this on all apps at the toolkit level, desktops should note a user preference for dark styles, and apps should read this preference then choose how to adapt their UI in response.
The dark preference should be implemented as the following scheme in GSettings:
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="color-schemes">
<value nick="no-preference" value="0" />
<value nick="dark" value="1" />
</enum>
<schema path="/org/freedesktop/" id="org.freedesktop">
<key name="prefers-color-scheme" enum="color-schemes">
<default>"no-preference"</default>
<summary>Prefers color scheme</summary>
<description>Preferred visual style for system components like the Panel indicators. Possible values are “no-preference” and “dark”. Future values might include “light”.</description>
</key>
</schema>
</schemalist>The key is intentionally an enum instead of boolean to allow for future expansion if desired.
Desktops may offer this preference to users in their standard desktop settings/preferences UI. Note that it is not explicitly a choice between "light" or "dark", as media or content-centric apps may still render dark when no-preference is set.
Instead, desktops should present this to users as a "Prefer dark style" toggle, or similar.
Apps should bind to this setting, appropriately updating their styling in response to changes.
The user has not expressed a specific preference for UI styling. As such, the app should use its normal styling, whether that is light or dark.
The user has explicitly expressed that they prefer dark styled user interfaces. Consequently, the app should render itself in a dark style. Care should be taken so that the app UI is still contrast-compliant, possibly desaturated accent colors to increase contrast and legibility.
See the wiki sidebar (below on mobile) for other sections, sub-pages, etc.