From 0217c0dde5a060dfd48318a70814687062e4ce3a Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou Date: Fri, 10 Apr 2026 18:57:57 +0300 Subject: Refine modus-themes--color-eight-to-six-digits Thanks to Stefan Monnier for pointing this in a message to the emacs-devel mailing list: . --- modus-themes.el | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.0