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.

UPDATED

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.

MethodOne keystrokeSetupAuto light/dark by time
Raycast Toggle System AppearanceYesOne hotkeyNo, use macOS Auto
Shortcuts appYesBuild a shortcutNo
Control Center or System SettingsNoNoneYes, with Auto

Toggle dark mode with Raycast

  1. Open Raycast and type Toggle System Appearance.
  2. Press ↵ to switch right away, or press ⌘ K and choose Configure Command.
  3. Record a hotkey. ⌃ ⌥ ⌘ D is easy to remember, and if you've set up a Hyper Key, ✦ D is even easier.
Toggle System Appearance is a built-in Raycast command. Give it a hotkey and it switches light and dark mode from anywhere.
Toggle System Appearance is a built-in Raycast command. Give it a hotkey and it switches light and dark mode from anywhere.

The hotkey works from any app, even when Raycast isn't open. Prefer typing? Give the command an alias like dm instead.

Pro tip: System Commands are full of one-key wins. Toggle Hidden Files, Toggle Mute, Lock Screen and Empty Trash all take a hotkey or alias the same way.

This three-minute video shows how hotkeys and aliases work in Raycast:

Build a shortcut in the Shortcuts app

The Shortcuts app can do it too, with a bit more setup.

  1. Open Shortcuts and click + to make a new shortcut.
  2. Search the actions for Set Appearance and add it.
  3. In the action, choose Toggle so it switches between light and dark instead of always setting one.
  4. Name the shortcut, then open its details (the i button) and click Add Keyboard Shortcut to record a key.

It works, though shortcuts can take a moment to start, and it's one more app to manage.

Use Control Center or System Settings

Without a shortcut, it's a few clicks:

  • Control Center: click the Control Center icon in the menu bar, click Display, then click Dark Mode.
  • System Settings: open System Settings → Appearance and choose Light, Dark or Auto.

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.

New to Raycast?

Here's a quick tour of what else it can do, in under seven minutes:

Frequently Asked Questions

Is there a keyboard shortcut for dark mode on Mac?

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.

How do I turn on dark mode on a Mac?

Open System Settings, click Appearance and choose Dark. You can also open Control Center, click Display and click Dark Mode.

How do I make my Mac switch to dark mode automatically?

In System Settings → Appearance, choose Auto. Your Mac uses light mode during the day and dark mode at night.

Can I switch dark mode without opening Raycast?

Yes. Once you give Toggle System Appearance a hotkey, it works from any app, even when the Raycast window is closed.

Why do some apps stay light in dark mode?

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.

Switch between light and dark mode with one hotkey. Try Raycast for free.

Download