Published at
Updated at
Reading time

If you're using a Mac, you might have noticed that Apple's operating system now comes with a setting to automatically toggle the UI between light and dark mode ("Appearance: Auto").

General macOS settings showing the Apperance settings with the options: light, dark and auto

The "auto" appearance value adjusts the UI to be bright during the day and enter dark mode UI later in the day.

How to react to appearance changes on your system

While many applications automatically change the display mode from light to dark or vice versa, terminal applications don't adjust their theme depending on light or dark mode. Fatih Arslan went on the journey to make vim, tmux, and other programs dark mode aware. He describes in great detail how they were able to make terminal applications react to dark mode on macOS.

If you want to implement something as a reaction to dark mode, read Fatih's article or check out Fatih's friend's GitHub project – dark-mode-modify.

Was this post helpful?
Yes? Cool! You might want to check out Web Weekly for more WebDev shenanigans. The last edition went out 8 days ago.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles