Here's the story behind it
If you define "dark mode" as a single, system-level switch that flips the entire interface (and participating apps) to a dark palette, the first modern OS to ship it out of the box was Windows Phone 7 in 2010. Microsoft even made the dark theme the default, with a user-selectable light option – years before the desktop world followed suit.
Crucially, Microsoft's guidelines asked apps to respect the system theme, and common controls inherited it automatically.
Bonus motivation: many early Windows Phones used AMOLED screens, where dark pixels can save power.
On desktops, things arrived a bit later and in steps. Windows 10 gained an official dark theme toggle in the Anniversary Update (2016), extending the look through core UI and many built-in apps.
The big mainstream push on the desktop side came with macOS Mojave (2018), which introduced a polished, system-wide Dark Mode and encouraged third-party developers to support it in their apps.
But when did dark mode become mainstream? 2019 is the inflection point. That year, iOS 13 and Android 10 both added system-wide dark modes, instantly putting the feature in the hands of hundreds of millions of phone users and standardizing developer APIs.
With both major mobile platforms and all major desktop OSes on board, app ecosystems followed quickly and dark mode became a default expectation rather than a novelty. Browsers added the prefers-color-scheme CSS media query around the same time, letting websites follow the user's setting automatically
Fun footnote: early CRT terminals were "dark mode" by default, but in the modern GUI era, the comeback took nearly a decade of nudges – from phones first, then desktops, then everywhere.
