exec defaults read -g AppleInterfaceStyle
If the answer is "Dark," it's dark -- if anything else, such as "The
domain/default pair of (kCFPreferencesAnyApplication,
AppleInterfaceStyle) does not exist", it's light.
A version of Tk is currently in development that will provide automatic
support/theme switching for dark mode in the ttk widgets, and
near-complete support in Tk widgets.
--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com