Using Emacs 27.1 (mac port, BigSur), I get a strange behavior when I set the mouse face color using an hexadecimal description. Running
emacs -Q -l show-bug.el, with
(font-lock-mode 0) (insert (propertize " CLICK " 'face '(:foreground "black" :background "light grey") 'mouse-face '(:foreground "white" :background "orange"))) (insert (propertize " CLICK " 'face '(:foreground "#37474F" :background "#ECEFF1") 'mouse-face '(:foreground "#FFFFFF" :background "#FFAB91"))) (insert "\n")
The two texts are properly rendered but when the mouse hovers the second button, it is not highlighted with the specified color (it becomes white instead). In the meantime, in the
*Messages* buffer, I get:
Unable to load color "#FFAB91" Unable to load color "#FFFFFF"
However, if I switch to the
*Messages* before hovering, the text becomes properly highlighted without error reporting. I would like to debug this but I'm not sure where to start.
Update 1 If I call
describe-char on the second text, hovering works properly.
Update 2 If the mouse pointer is over the position where the button will appear (after starting emacs), it also works.
Update 3 It has been fixed