NativeTheme

external interface NativeTheme : EventEmitter(source)

Properties

Link copied to clipboard

A boolean indicating whether Chromium is in forced colors mode, controlled by system accessibility settings. Currently, Windows high contrast is the only system setting that triggers forced colors mode.

Link copied to clipboard

A boolean for if the OS / Chromium currently has a dark mode enabled or is being instructed to show a dark-style UI. If you want to modify this value you should use themeSource below.

Link copied to clipboard

A boolean for if the OS / Chromium currently has high-contrast mode enabled or is being instructed to show a high-contrast UI.

Link copied to clipboard

A boolean for if the OS / Chromium currently has an inverted color scheme or is being instructed to use an inverted color scheme.

Link copied to clipboard

A string property that can be system, light or dark. It is used to override and supersede the value that Chromium has chosen to use internally.

Functions

Link copied to clipboard
abstract fun addListener(event: NativeThemeEvent.UPDATED, listener: Function<Unit>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun off(event: NativeThemeEvent.UPDATED, listener: Function<Unit>)
Link copied to clipboard
abstract fun on(event: NativeThemeEvent.UPDATED, listener: Function<Unit>)

Emitted when something in the underlying NativeTheme has changed. This normally means that either the value of shouldUseDarkColors, shouldUseHighContrastColors or shouldUseInvertedColorScheme has changed. You will have to check them to determine which one has changed.

Link copied to clipboard
abstract fun once(event: NativeThemeEvent.UPDATED, listener: Function<Unit>)
Link copied to clipboard
abstract fun removeListener(event: NativeThemeEvent.UPDATED, listener: Function<Unit>)
Link copied to clipboard