Why is Emacs syntax highlighting in the Gnome terminal affected by terminal color themes?

I am using Emacs 24.3 under Ubuntu 14.04.1. I would like to use it both through the GTK interface and with the Gnome c terminal emacs -nw. Unfortunately, the colors for any theme that I use are slightly different in the terminal.

I found everything to a Gnome terminal TERM=xterm-256color. However, I also set my terminal colors - “black” actually #151515, “red” - #DA4939etc. Emacs seems to be getting closer to displaying the right colors for each theme, but it is never right. The themes I use are style deftheme.

I don’t understand why the terminal color setting should affect this - s TERM=xterm-256color, Emacs should have access to a larger palette than the usual 16 colors. The output list-colors-display blackdisplays as #000000, but displays as #151515; there is, however, color-16which is also displayed as #000000and displayed correctly. In this way, Emacs is really capable of displaying #000000.

Emacs GTK vs terminal comparison

On the left is the Emacs GTK, which correctly displays the colors of themes. On the right, it emacs -nwruns in the Gnome terminal, where all the colors are slightly different from what the theme sets. The theme I used for this picture is just an example; this happens with any topic. My full config is on github .

Emacs Gnome ?

+4
1

:

1) , " ", 16 256 . , emacs 0-15, , , . , , , .

2) 256 , 256 ( , 241, 16) , .

GTK, 256, , . , emacs 256 .

, , script, , show-all-256-colors.py script . , , , 000 015 , .

+4

All Articles