From Xojo Documentation
Constant As Boolean
Indicates if the app is built with Supports Dark Mode property set to ON.
result = AppSupportsDarkMode
|result||Boolean||Returns True if you are compiling or running an app with Supports Dark Mode property set to ON.|
Use AppSupportsDarkMode to isolate code specific for when Supports Dark Mode is ON or OFF.