1

Both of my computers, says A and B, have a terminal that supports 24-bit color. Opening emacs on both terminals also show the 24-bit colors, e.g. executing M-x list-colors-display will list 556 different colors instead of the classic 256 colors (8 bit). But if I log in to B through ssh from A, and open the emacs installed on B using the terminal console of A, it shows only 8-bit colors when I execute M-x list-colors-display. How do I get all of the colors of B's emacs when opening it from A? Both computers have emacs 28.2.

1 Answer 1

3

I looked in the GNU Emacs FAQ and found this method, but it seems to only work for GNU/Linux:

If Terminfo database is not available, but 24-bit direct color mode is supported, it can still be enabled by defining the environment variable COLORTERM to ‘truecolor’.

And I tried it myself:

$ export COLORTERM=truecolor
$ emacs -Q

then type M-x list-colors-display. It works for me.

2
  • By the way, generally speaking, true color and 24-bit color mean the same thing.
    – shynur
    Commented May 1, 2023 at 19:31
  • Thank you, it works for me too. I guess the problem is this env variable is not automatically set to truecolor when one logs in remotely.
    – nougako
    Commented May 1, 2023 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.