How to get background type of Emacs? e.g. 'light
or 'dark
You can define a face like this:
(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 select correct font face automatically by current background type. But I want to know how it do. (It is better if there is an build-in function in Emacs)
By the way, I try to seek in source code and found a function (frame-background-color), but its output is string like "#ffffff".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With