How can I make the window titlebar color the same as the system color theme? (Mac OS)

I am wondering how I would be able to make it so the window title bar changes to the system color theme (in this case dark) on macOS. Currently, when I run my game the titlebar is light, even though I am using dark mode. Is there a way to change it programmatically?