branch: externals/engrave-faces
commit 2628fd8936443dd10e6a8d68ce140dc4603cf62b
Author: TEC <[email protected]>
Commit: TEC <[email protected]>
fix: transform named colors into hex colors
---
engrave-faces.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/engrave-faces.el b/engrave-faces.el
index 7dc8d46de7..afe2111d96 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -387,7 +387,13 @@ Unconditionally returns nil when FACES is default."
(when (or (engrave-faces--check-nondefault attr
attr-val)
(and (eq (car face-style) 'default)
(not (memq attr '(:height
:strike-through)))))
- (list attr attr-val))))
+ (list attr
+ (if (and (memq attr '(:foreground :background))
+ (not (string-prefix-p "#" attr-val)))
+ (apply 'format "#%02x%02x%02x"
+ (mapcar (lambda (c) (ash c -8))
+ (color-values attr-val)))
+ attr-val)))))
engrave-faces-attributes-of-interest))))
engrave-faces-preset-styles))