A set of .NET Framework managed libraries for developing graphical user interfaces.
You detect the mode change with WM_SETTINGCHANGE and lParam = "ImmersiveColorSet"
then you get and change colors from Windows.UI.ViewManagement.UIColorType
or Immersive color APIs like GetImmersiveColorFromColorSetEx
(I had posted a sample in C++ to get all colors at How to get colors of default app mode "Dark" in my Win32 App )