mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Define function to get readable foreground, based on our own "dark-p" (per commit 4ecefd9)
This commit is contained in:
parent
4ecefd924f
commit
2c225b634e
|
|
@ -4210,6 +4210,13 @@ Run `modus-themes-after-load-theme-hook' after loading a theme."
|
|||
Test that HEX-COLOR has more contrast against white than black."
|
||||
(> (modus-themes-contrast hex-color "#ffffff")
|
||||
(modus-themes-contrast hex-color "#000000")))
|
||||
|
||||
(defun modus-themes-get-readable-foreground (hex-color)
|
||||
"Get readable foreground for background hexadecimal RGB HEX-COLOR."
|
||||
(if (modus-themes-color-dark-p hex-color)
|
||||
"#ffffff"
|
||||
"#000000"))
|
||||
|
||||
(defun modus-themes--list-colors-get-mappings (palette)
|
||||
"Get the semantic palette entries in PALETTE.
|
||||
PALETTE is the value of a variable like `modus-operandi-palette'."
|
||||
|
|
|
|||
Loading…
Reference in a new issue