The OpenD Programming Language

ICoreWebView2Profile.get_PreferredColorScheme

The PreferredColorScheme property sets the overall color scheme of the WebView2s associated with this profile. This sets the color scheme for WebView2 UI like dialogs, prompts, and context menus by setting the media feature prefers-color-scheme for websites to respond to.

The default value for this is COREWEBVIEW2_PREFERRED_COLOR_AUTO, which will follow whatever theme the OS is currently set to.

\snippet ViewComponent.cpp SetPreferredColorScheme Returns the value of the PreferredColorScheme property.

interface ICoreWebView2Profile
@" propget"
HRESULT
get_PreferredColorScheme
(
COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value
)

Meta