From Xojo Documentation

Revision as of 19:05, 3 September 2020 by THill (talk | contribs) (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Global Method

IsDarkMode() As Boolean

New in 2018r3

Supported on Desktop.

Indicates if the app is running in dark mode for the OS.


result = IsDarkMode

Part Type Description
result Boolean True if the app is running in dark mode and False if it is not.


Currently this will only return True when running on macOS Mojave or later when dark mode is enabled in System Preferences and when Supports Dark Mode is set to ON in the project Shared Build Settings.

For the most accurate results, IsDarkMode is not cached. If you are using it within a tight drawing space (such as Listbox rows) you may optionally cache it yourself for faster drawing.

See Also

FillColor, FrameColor, TextColor methods; UserGuide:Dark Mode topic