macOS DarkMode / Light / Auto

I can change the theme of my “app” by using these command, this is independent of the rest of macOS

self.appearance =  NSAppearance(named: .darkAqua) // app forced to be darkmode
self.appearance =  NSAppearance(named: .aqua) // app forced to be lightmode

but how can I determine what the SYSTEM value is… so I can reset the app to the same theme as the OS is set to

Have you tried NSappearance( Nil )?

No idea if this works but Nil is the default.

YES!

self.appearance = nil

resets to what ever the “system” is

1 Like