How to Toggle Dark Mode With a Shortcut on Mac
Switch your Mac between light and dark mode with one keystroke. macOS has no shortcut for it by default, so here's how to set one up with Raycast or the Shortcuts app.
Switch your Mac between light and dark mode with one keystroke. macOS has no shortcut for it by default, so here's how to set one up with Raycast or the Shortcuts app.
You switch to dark mode at night, back to light mode in a bright café, and again when you share your screen. Each time it's a trip to System Settings, because macOS doesn't come with a keyboard shortcut for it.
The short answer: open Raycast, find Toggle System Appearance, press ⌘ K, choose Configure Command and record a hotkey like ⌃ ⌥ ⌘ D. From then on, that key flips your Mac between light and dark mode from any app. It's one of Raycast's built-in System Commands, and it's free.
| Method | One keystroke | Setup | Auto light/dark by time |
|---|---|---|---|
| Raycast Toggle System Appearance | Yes | One hotkey | No, use macOS Auto |
| Shortcuts app | Yes | Build a shortcut | No |
| Control Center or System Settings | No | None | Yes, with Auto |
↵ to switch right away, or press ⌘ K and choose Configure Command.⌃ ⌥ ⌘ D is easy to remember, and if you've set up a Hyper Key, ✦ D is even easier.
The hotkey works from any app, even when Raycast isn't open. Prefer typing? Give the command an alias like dm instead.
This three-minute video shows how hotkeys and aliases work in Raycast:
The Shortcuts app can do it too, with a bit more setup.
It works, though shortcuts can take a moment to start, and it's one more app to manage.
Without a shortcut, it's a few clicks:
Auto is the one to know about. It switches to dark mode in the evening and back in the morning by itself. A Raycast hotkey is still handy for the moments in between, like a bright room or a screen share.
Here's a quick tour of what else it can do, in under seven minutes:
Not by default. You can add one with Raycast's free Toggle System Appearance command, or with a shortcut in the Shortcuts app that uses the Set Appearance action.
Open System Settings, click Appearance and choose Dark. You can also open Control Center, click Display and click Dark Mode.
In System Settings → Appearance, choose Auto. Your Mac uses light mode during the day and dark mode at night.
Yes. Once you give Toggle System Appearance a hotkey, it works from any app, even when the Raycast window is closed.
Some apps have their own appearance setting that overrides the system, and websites decide for themselves whether to follow it. Check the app's settings for an option like Use System Appearance.
More guides
Turn Caps Lock into a Hyper Key on Mac and get a whole layer of shortcuts that never clash with your apps. How to do it with Raycast in a minute, or with Karabiner-Elements.
Connect your AirPods, headphones, keyboard or mouse without digging through menus. Three ways to do it on a Mac: Control Center, System Settings, and the free Toothpick extension for Raycast.
Jump between AirPods, speakers and your display without digging through menus. Three ways to change your Mac's sound output: the menu bar, System Settings, and the free Set Audio Device extension.
Open the sites, folders and searches you use every day with a keyword or a hotkey. How to do it with Raycast Quicklinks, Safari's Favorites shortcuts, the Shortcuts app and web apps in the Dock.
