- Raspberry Pi OS now has an officially supported dark mode, making late-night coding less painful on your eyes.
- Developing dark mode for Raspberry Pi was challenging due to hard-coded colors, but the effort of going through 4500 lines of code was worth it.
- While not all Raspberry Pi themes have a dark mode, most standard themes work as intended.
If you’ve ever been up late at night coding with your Raspberry Pi kit, you likely know about how bright the operating system’s UI can be. For the longest time, Raspberry Pi OS didn’t have an official dark mode, making late-night coding pretty painful. Now, Raspberry Pi has released an officially supported dark mode for its operating system, so you can code, play, and experiment while saving your eyes.
Raspberry Pi’s new dark mode
As announced on Raspberry Pi news, the UX designer Simon Long discusses how the Raspberry Pi dark mode came to be. While it had always been a requested feature, Simon was spurred to action when his boss said that it “would be nice” if the system came with a built-in dark mode. The problem is that developing dark mode for Raspberry Pi was a lot trickier than simply flipping a few variables:
Creating a dark theme can be relatively easy, or really hard, depending on how the colours have been defined in your original theme. If all your colours are defined as variables, it is relatively easy — but if all your colours are hard-coded values, then it is rather more time-consuming. And of course, in PiXflat, as in Adwaita before it, the colours were all hard-coded!
Simon had to go through 4500 lines of code to bring dark mode to Raspberry Pi, but we think it was an effort well spent. The new dark mode theme makes Raspberry Pi’s UI look amazing, and far easier on the eyes when using it in a darker environment.
Unfortunately, not every Raspberry Pi theme will have its corresponding dark theme, so your results may vary. However, Simon states that “pretty much all our other standard applications will theme as intended,” so try changing to one of the default themes if yours doesn’t support dark mode.