0

I would like to invert the screen colors with a script (osascript, bash, applescript or even with something in C code).

The closest thing I have found is toggle the dark theme.

> osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'

I tried a lot of things, but without any luck. I was able to change the defaults file, but I want the changes to apply without logging out.

  • Possible duplicate of https://apple.stackexchange.com/q/222448 and https://stackoverflow.com/q/6511304/6770384 – Socowi Jan 18 '23 at 00:06
  • Either osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to true' or osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to false' works on OS X Catalina 10.15.7 (19H2026). Neither requires a logout – j_b Jan 18 '23 at 00:51

0 Answers0