From EmacsWiki: Hex Colour, it is explained how to get in-line syntax highlighting of hex code, and other formats of color. For instance with
(defvar hexcolour-keywords
'(("#[abcdef[:digit:]]\\{6\\}"
(0 (put-text-property (match-beginning 0)
(match-end 0)
'face (list :background
(match-string-no-properties 0)))))))
But when I try this with some emacs-lisp such as
(set-face-attribute 'org-todo nil
:weight 'bold :box '(:line-width 1 :color "#D8ABA7")
:foreground "#D8ABA7" :background "#FFE6E4")
the hex is not given the color face. If I try M-x describe-face
on these, I find face is org-block-background
. Is there a good way to override this?