DevelopmentCool2449 / colorful-mode

🎨Preview any color in your buffer
GNU General Public License v3.0
55 stars 3 forks source link

Config in different modes #11

Open fol9000 opened 1 month ago

fol9000 commented 1 month ago

Hello,

with the following configuration colorful-mode displays the values correctly with a colored prefix in Lisp mode (e.g.init.el) but not in a scss file (scss-mode, https://github.com/antonj/scss-mode). In scss-mode colorful-mode is active but color values are shown with a colored background not with a prefix. Is it a bug or is sth wrong with my config? Adding scss-mode to the hook modes doesn't change anything.

(use-package colorful-mode
  :ensure t
  :init
  (setq colorful-use-prefix t
        colorful-prefix-string "●")
  :hook (prog-mode text-mode))
jcs090218 commented 1 month ago

I cannot reproduce this. It works on my end. 🤔

fol9000 commented 1 month ago

I think I found the problem: I checked rainbow-mode: same problem. But: scss-mode derives from css-mode which also has a feature to colorize the background of color values. So I switched off css-mode's colorize feature with M-x customize-option css-fontify-colors and now rainbow-mode as well as colorful-mode work for me in (s)css also. Maybe a small hint in the README file can help others who also experience this kind of problem...