Change macOS light and dark mode via command line

Table of Contents
I normally have my macOS set to dark mode because developer, but sometimes I need to take screenshots for talk slides. For readability and accessibility, it’s important to have enough contrast, and often dark text on a light background is best.
Aliases #
Rather than having to click 🍎 > System Settings… > Appearance > Light, here’s a couple of aliases to do it from the command line:
alias light-mode='osascript -e "tell app \"System Events\" to tell appearance preferences to set dark mode to false"'
alias dark-mode='osascript -e "tell app \"System Events\" to tell appearance preferences to set dark mode to true"'
Then I can type light-mode, take the screenshot, and then go back with dark-mode.
See also #
Some info on accessible presentations:
Header photo: Snow basketball today (CC BY-NC-SA 2.0 Hugo van Kemenade).