How to get Emacs background type? for example 'lightor'dark
You can define a face as follows:
(defface moedict-type
'((((class color) (background light))
(:foreground "#ffffd7" :background "#525252"))
(((class color) (background dark))
(:foreground "#525252" :background "#c1c1c1")))
"Face for type. ex: [ε]γ[ε]")
And Emacs will automatically select the correct font surface for the current background type. But I want to know how this happens. (Better if Emacs has a built-in function)
By the way, I try to search in the source code and find a function (frame-background-color), but its output has a string like "#ffffff".
source
share