Dark mode
This setting, which darkens background colours, provides a more comfortable viewing experience in low light. This is essential for many visually impaired people since a light background colour can be painful or even impossible to look at for an extended period of time.
More than 4 million users in the Netherlands prefer the dark mode over the standard light mode, according to our research.
37.48%
have turned on dark mode on iOS.
23.91%
have turned on dark mode on Android.
Why is this an accessibility feature?
On Android, this feature is explicitly listed under accessibility in the menu. So the system determines whether the dark theme is on or off. Apple does not classify dark mode as an accessibility feature. But for many people with disabilities it is necessary. Some people who are blind or visually impaired are also hypersensitive to light. Looking at a bright white screen can be very painful for them. But also people who have problems with their concentration, for example due to a brain disorder, benefit greatly from dark mode. Incidentally, both iOS and Android also offer the option to reverse colours altogether.

Support in apps
Below are some code samples for the most commonly used platforms and frameworks.
On Android, you can detect dark mode by checking if the uiMode
configuration contains UI_MODE_NIGHT_MASK
.
By adding -night
resources to your project you can let Android automatically pick the right resources. For example, add a colors.xml
file inside a values-night
folder to specify night mode colors.
fun Context.isInNightMode(): Boolean {
val nightModeFlags = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
return nightModeFlags == Configuration.UI_MODE_NIGHT_YES
}