mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Bring back the modus-themes-adjust-value
Derivative themes may need it.
This commit is contained in:
parent
cb20bbe83f
commit
ed36e34132
|
|
@ -3784,6 +3784,14 @@ HEX-COLOR-1 and HEX-COLOR-2 are color values written in hexadecimal RGB."
|
|||
(+ (modus-themes-wcag-formula hex-color-2) 0.05))))
|
||||
(max ct (/ ct))))
|
||||
|
||||
(defun modus-themes-adjust-value (hex-rgb percentage)
|
||||
"Adjust value of HEX-RGB colour by PERCENTAGE."
|
||||
(pcase-let* ((`(,r ,g ,b) (color-name-to-rgb hex-rgb))
|
||||
(fn (if (color-dark-p (list r g b))
|
||||
#'color-lighten-name
|
||||
#'color-darken-name)))
|
||||
(funcall fn hex-rgb percentage)))
|
||||
|
||||
(defvar modus-themes-registered-items nil
|
||||
"List of defined themes.
|
||||
This list is instantiated by the `modus-themes-theme' macro. Themes
|
||||
|
|
|
|||
Loading…
Reference in a new issue