1

I use helm a lot. I have a problem setting colors. In my init.el I have

(require 'helm)
(require 'helm-config)

;; change active line color
(set-face-attribute 'helm-selection nil 
                   :background "red"
                   :foreground "white")

Supose I have the situation in the picture below where I search for XXX. In C the helm-occur buffer uses red/white colors for the selected line. But in the parent buffer in point B I still have green and purple for the pattern match. I'd like to change the colors in B so that they match what happens in C. I suppose I should do something like the code above, but I don't understand what controls the colors in B



enter image description here

2

First, instead of the code you're using to customize face helm-selection, just use M-x customize-face, and save your changes. Using Customize is nearly always a better idea.


To your question:

Put your cursor on the text whose face you want to know, e.g. the face you say is "green and purple", and use C-u C-x =. The *Help* buffer will tell you (near the bottom) what faces are present at that position.

Then use M-x customize-face to customize that face (likewise, any others). When customizing you can even define a face to just inherit from some other face. Easy-peasy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.