I'm trying to customize the look and feel of my Magit setup. How do I change the background color of the section heading below?

In particular, I'd like to change the black background color next to the "Unstaged changes" text.

(Normally I could do a C-u C-x = to get the face, but in this case I cannot click on this section heading)

enter image description here

2 Answers 2


The Unstaged changes line is not a section heading. Sections and their headings are part of the buffer text, but this line is not part of that, otherwise it would not stay in place when you scroll the buffer.

Instead this text is being displayed in the header-line. The face that controls the Unstaged changes part is magit-header-line. The rest of the line is styled using theheader-line` face.

  • Thank you! That worked. Out of curiosity, how did you know it was the magit-header-line or header-line face that needed to be changed?
    – Debajit
    Nov 6, 2017 at 20:55

For my solarized theme I have the following line in my .emacs.

(require 'magit)
(set-face-attribute 'magit-header-line nil :background "#073642")
New contributor
krissy is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.