Subject: Re: bug#34606: Emacs colors are off in screen sessions

From: Eli Zaretskii <[email-masked]>
Date: Thu, 21 Feb 2019 21:21:45 +0200

> Cc: [email-masked]
> From: Clément Pit-Claudel <[email-masked]>
> Date: Thu, 21 Feb 2019 11:37:25 -0500
> 
> > Emacs on a TTY doesn't control the colors in RGB terms, it just tells
> > the terminal to display color number N.  What you actually see as
> > result is up to the terminfo entry and the terminal emulator, AFAIK
> > mostly the latter.  So I'd suggest to dig into 'screen's
> > customizations to see how to affect the colors (I customized the
> > colors of PuTTY to get something I like, for example).
> 
> I don't understand. If that is the case, how can changing the value of the TERM environment variable change the colors displayed by emacs?

Because the terminfo entry defines both the number of colors and the
specific command to turn on a given color.  (If that doesn't explain
what you were asking about, maybe I didn't understand the question
well enough.)