prefers-color-scheme CSS media query. Your app sets this parameter to light and dark based on the current device mode, and will change it dynamically when the device mode changes.
You may add a control toggle within your web content to force light or dark mode in addition to following the device setting (Auto mode). Median will set a property on your webpage called data-color-scheme-option with the current app setting of light, dark, or auto. You can use the value of this property to set the state of said toggle.
Dark mode switcher demo