All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

top-level-interface-dark-mode-p Function

Summary

Determines if a top level interface is displayed in dark mode.

Package

capi

Signature

top-level-interface-dark-mode-p interface => dark-mode-p

Arguments
interface
An interface instance.
Values
dark-mode-p
A Boolean.
Description

The function top-level-interface-dark-mode-p returns true if interface is currently displayed in dark mode and false otherwise. If interface is not displayed, top-level-interface-dark-mode-p returns false.

On Cocoa, interface is in dark mode if the name of its effective Appearance contains "dark" (ignoring case). That works for the standard appearances, but may not work for user defined ones. On GTK+ and Microsoft Windows, interface is in dark mode if its default background color is dark, which is checked summing the RGB values and comparing with 1.5.

Examples
(example-edit-file "capi/applications/interface-color-mode")
See also

interface
top-level-interface-color-mode


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42