6

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

Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564

3 Answers3

6

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.

Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
  • Oh weird. At face value (no pun intended), that sounds like a bug in Emacs' `term-color-*` settings, if there are standards for these colours? – phils Feb 08 '14 at 23:15
  • Or maybe not -- if I run `emacs -Q`, load `term`, and then `M-x customize-face term-color-blue` the value is `blue2` which is much darker than what you were seeing initially. Are you modifying those colours elsewhere in your Emacs' config? – phils Feb 08 '14 at 23:19
  • @phils Yes, you are right, I was modifying those faces unawarely already to make them compatible with the tango theme (the colors displayed at the bottom of the OP shows the color choices used in the top screenshot) – Amelio Vazquez-Reina Feb 09 '14 at 16:29
  • If you want to change it non interactively use: `(set-face-attribute 'term-color-blue nil :foreground "DeepSkyBlue")` I need to use run this in `term-exec-hook` because otherwise it was throwing an error. – jcubic Jun 11 '14 at 14:43
3

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?

phils
  • 71,335
  • 11
  • 153
  • 198
  • Thanks @phils I asked this question since I was unable to modify the colors for the `less` command (see my other question [here](http://unix.stackexchange.com/questions/113852/customizing-less-colors)). What you see above is the output of the `ls` command after passing it through the pager `less`. Not sure exactly who is responsible for this coloring then. To answer your question, yes I am running a shell (Zsh in particular) within an `M-x ansi-term` buffer in Emacs. – Amelio Vazquez-Reina Feb 08 '14 at 20:04
3

The most efficient way to do that is to use the Emacs customization group

M-x customize-group RET term RET

This will open

enter image description here

aurelien
  • 404
  • 4
  • 22