diff options
| author | Protesilaos Stavrou <info@protesilaos.com> | 2026-04-10 18:57:57 +0300 |
|---|---|---|
| committer | Protesilaos Stavrou <info@protesilaos.com> | 2026-04-10 18:57:57 +0300 |
| commit | 0217c0dde5a060dfd48318a70814687062e4ce3a (patch) | |
| tree | 1284762062cbf9da39142ca8453219b615a420ad | |
| parent | 8a8ed85ae7ffd0ada0cbb25797faaf5472e52f9f (diff) | |
Refine modus-themes--color-eight-to-six-digits
Thanks to Stefan Monnier for pointing this in a message to the
emacs-devel mailing list: <https://lists.gnu.org/archive/html/emacs-devel/2026-04/msg00358.html>.
| -rw-r--r-- | modus-themes.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modus-themes.el b/modus-themes.el index 35d628f..f91b157 100644 --- a/modus-themes.el +++ b/modus-themes.el @@ -3785,8 +3785,7 @@ HEX-COLOR-1 and HEX-COLOR-2 are color values written in hexadecimal RGB." "Reduce representation of hexadecimal RGB HEX-COLOR from eight to six digits. If HEX-COLOR is three or six digits, then return it as is." (let ((color-no-hash (substring hex-color 1))) - (if (or (= (length color-no-hash) 3) - (= (length color-no-hash) 6)) + (if (memq (length color-no-hash) '(3 6)) hex-color (let* ((triplets (seq-split color-no-hash 4)) (triplets-shortened (mapcar |
