This uses a Windows Registry entry to check if the user is using dark mode in Windows 10. This check only happens if the user is running Windows 10 version 1607 (build 10.0.14393) or higher as that is when dark mode was introduced to Windows 10. This code was tested on Windows 10 version 1909 and macOS Mojave 10.14 (to check that I didn't break anything).
This uses a Windows Registry entry to check if the user is using dark mode in Windows 10. This check only happens if the user is running Windows 10 version 1607 (build 10.0.14393) or higher as that is when dark mode was introduced to Windows 10. This code was tested on Windows 10 version 1909 and macOS Mojave 10.14 (to check that I didn't break anything).