Search code examples
emacsterminalkonsole

True Color (24 bit) in Terminal Emacs


I am looking for a good way to have 24 bit color in emacs when using a graphical terminal emulator. Konsole, for example, does support escape codes for true color, as documented here: https://github.com/robertknight/konsole/blob/master/user-doc/README.moreColors

My problem is that I do not understand how emacs translates face information into escape sequences for the terminal. I also did not manage whether support for 24 bit color is present somewhere, or whether it is at all possible to implement it with emacs lisp. What I am asking for is a pointer to the relevant Emacs documentation or an informed opinion on whether having true color in terminal-emacs is feasible at the moment.


Solution

  • I use xterm-frobs.el to get 256 color term support (in xterm compatible terminals, like konsole). i use the TERM setting "xterm-256color". 256 color support has generally been more than sufficient for me, as i don't use that many colors in my color scheme. the aforementioned file attempts to interrogate the terminal to find out how many colors it supports. i don't know if it should (or could be adapted to) be able to do true color support in konsole.

    UPDATE: Note that as of version 26.1, emacs now has support for true color terminals. Please see the answer below for more details.