Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying ansi-term colors in Emacs

The text in the red ellipse below is hard to read

                     enter image description here

When I inspect the face with C-u C-x = (what face) I see the following:

enter image description here

So I went to update the face term-bold (see below), but the color doesn't seem to match what I actually got on the screen above (it should be blue+yellow according to the face definition). Any thoughts?

enter image description here

like image 935
Amelio Vazquez-Reina Avatar asked Feb 07 '14 18:02

Amelio Vazquez-Reina


2 Answers

Emacs uses its own terminal colors to render ansi color codes. You can change the appearance of the face that you are referring to by changing two faces:

  • term-color-yellow
  • term-color-blue

For example, changing the foreground property of the face term-color-yellow to yellow3, and the background property of the face term-color-blue to dark-blueresults in the following appearance:

                  enter image description here

which is more readable than the face in the original post and resembles the traditional appearance of the blue and yellow terminal colors.

like image 62
Amelio Vazquez-Reina Avatar answered Sep 28 '22 08:09

Amelio Vazquez-Reina


It's telling you that the face inherits from term-bold, and then over-rides the inherited foreground, background, and inverse-video properties.

I would guess the colours are coming from the shell (I assume it's a shell) that you're running in that terminal. So you probably need to configure the colours outside of Emacs?

like image 43
phils Avatar answered Sep 28 '22 06:09

phils