On this page:
white-on-black-panel-scheme?

22 White on Black Panel Predicate🔗ℹ

 (require mrlib/panel-wob) package: gui-lib

This predicate is intended to determine if the underlying operating system is in a dark mode.

Under relatively recent versions of Mac OS, it queries dark mode directly. See also application-dark-mode-handler.

On other platforms, it determines if the foreground color of the panel background is lighter than the background color. If they appear to be the same, white-on-black-panel-scheme? returns #f.