24 bit True Color in Konsole


I have yearned to use 24-bit colors in the terminal for applications such as Vim. However, xterm is limited to no more than 256 colors, which I have currently been using. I just recently learned that the Konsole terminal actually supports this True Color, but unfortunately I cannot find the correct environment to use these colors. I have only been able to set "konsole-256color" so far. How can I set Konsole to use True Color for Vim and whatnot, is this possible, or are these colors not standard in the Konsole implementation (I was inspired to use this for the new Vim powerline Python implementation)?

Best Answer

Konsole, gnome-terminal (and all vte-based GTK+ 3 terminals since vte 0.35.1), qterminal and st (from suckless) support true colors on Linux, and iTerm2 support it on Mac.

Unfortunately there's no termcap/terminfo support for this feature at the moment, and hence there's no correct value for $TERM either. Nor do the screen libraries ncurses and slang support the feature, and it seems they require ABI-incompatible change to get this fixed.

The best you can do for now is set TERM=xterm-256color (or similar) and have the escape sequences hardcoded in applications (assuming the app does its own terminal handling, rather than relying on ncurses).

I'm afraid it's going to take years to get this feature properly supported at all levels of the stack.

Related Question