{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/59","labels_url":"https://api.github.com/repos/neovim/neovim/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/59/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/59/events","html_url":"https://github.com/neovim/neovim/issues/59","id":28105977,"number":59,"title":"True Color support in both GUI and console application","user":{"login":"XVilka","id":203261,"avatar_url":"https://avatars.githubusercontent.com/u/203261?v=3","gravatar_id":"","url":"https://api.github.com/users/XVilka","html_url":"https://github.com/XVilka","followers_url":"https://api.github.com/users/XVilka/followers","following_url":"https://api.github.com/users/XVilka/following{/other_user}","gists_url":"https://api.github.com/users/XVilka/gists{/gist_id}","starred_url":"https://api.github.com/users/XVilka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XVilka/subscriptions","organizations_url":"https://api.github.com/users/XVilka/orgs","repos_url":"https://api.github.com/users/XVilka/repos","events_url":"https://api.github.com/users/XVilka/events{/privacy}","received_events_url":"https://api.github.com/users/XVilka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/tui","name":"tui","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-02-22T22:06:16Z","updated_at":"2016-02-01T09:35:23Z","closed_at":"2015-03-20T16:35:02Z","body":"See the support/patches for original VIm https://bitbucket.org/ZyX_I/vim/commits/branch/24-bit-xterm\r\nAlso, ncurses is not going to have support for that (thanks its author!).\r\nAnd now it is supported by major part of terminal applications.\r\nHere is the addition info about true colors:\r\nColors in terminal\r\n==================\r\nIt's a common confusion about terminal colors... Actually we have this:\r\n* plain ascii\r\n* ansi escape codes (16 color codes with bold/italic and background)\r\n* 256 color palette (216 colors+16gray + ansi) (colors are 24bit)\r\n* 24bit true color (888 colors (aka 16 milion))\r\n\r\nThe 256 color palete is configured at start, and it's a 666 cube of\r\ncolors, each of them defined as a 24bit (888 rgb) color.\r\n\r\nThis means that current support can only display 256 different colors\r\nin the terminal, while truecolor means that you can display 16 milion\r\ndifferent colors at the same time.\r\n\r\nTruecolor escape codes doesnt uses a color palete. It just specifies the\r\ncolor itself.\r\n\r\nHere's a test case:\r\n```\r\nprintf \"\\x1b[38;2;255;100;0mTRUECOLOR\\x1b[0m\\n\"\r\n```\r\n* or http://github.com/robertknight/konsole/tree/master/tests/color-spaces.pl\r\n* or https://git.gnome.org/browse/vte/tree/perf/img.sh?h=vte-0-36\r\n\r\nKeep in mind that it is possible to use both ';' and ':' as parameters delimiter.\r\n\r\nAccording to Wikipedia[1], this is only supported by xterm and konsole.\r\n\r\n[1] https://en.wikipedia.org/wiki/ANSI_color\r\n\r\nHere are terminals discussions:\r\n==============================\r\n\r\nNow **supporting** truecolor\r\n----------------------------\r\n\r\n* [st](http://st.suckless.org/) (from suckless) [delimeter: semicolon] -  http://lists.suckless.org/dev/1307/16688.html\r\n* [konsole](http://kde.org/applications/system/konsole/) [delimeter: colon, semicolon] - https://bugs.kde.org/show_bug.cgi?id=107487\r\n* [iterm2](http://www.iterm2.com/) [delimeter: colon, semicolon] - only in the nighties https://code.google.com/p/iterm2/issues/detail?id=218\r\n* [qterminal](https://github.com/qterminal/qterminal) [delimeter: semicolon] - https://github.com/qterminal/qterminal/issues/78\r\n* [Tera Term](http://en.sourceforge.jp/projects/ttssh2/) [delimeter: colon, semicolon] - **Windows platform**\r\n* [FinalTerm](http://finalterm.org/) [delimeter: semicolon]\r\n* all [libvte](http://ftp.gnome.org/pub/GNOME/sources/vte/) based terminals (since 0.36 version) [delimeter: colon, semilocon] -  https://bugzilla.gnome.org/show_bug.cgi?id=704449\r\n    * **libvte**-based [Gnome Terminal](https://help.gnome.org/users/gnome-terminal/stable/)\r\n    * **libvte**-based [sakura](http://www.pleyades.net/david/projects/sakura)\r\n    * **libvte**-based [Terminator](http://gnometerminator.blogspot.com/p/introduction.html)\r\n    * **libvte**-based [Lilyterm](http://lilyterm.luna.com.tw/) - since commit https://github.com/Tetralet/LilyTerm/commit/72536e7ba448ad9ef1126ce45fbde3a3407a271b\r\n    * **libvte**-based [ROXTerm](http://roxterm.sourceforge.net/)\r\n    * **libvte**-based [evilvte](http://www.calno.com/evilvte/) - no release yet, version from git https://github.com/caleb-/evilvte\r\n    * **libvte**-based [Termit](https://github.com/nonstop/termit)\r\n    * **libvte**-based [Termite](https://github.com/thestinger/termite)\r\n    * **libvte**-based [Tilda](https://github.com/lanoxx/tilda)\r\n    * **libvte**-based [tinyterm](https://code.google.com/p/tinyterm)\r\n    * **libvte**-based [lxterminal](http://sourceforge.net/projects/lxde) - with **--enable-gtk3** configure flag.\r\n\r\nBut there are bunch of libvte-based terminals for GTK2 so they are listed in the another section.\r\n\r\nParsing ANSI color sequences, but approximating them to 256 palette\r\n-------------------------------------------------------------------\r\n\r\n* xterm (though doing it wrong: \"it uses nearest colour in RGB colour space, with a usualfalse assumption about orthogonal axes\")\r\n* [mlterm](https://sourceforge.net/projects/mlterm/) - http://sourceforge.net/mailarchive/message.php?msg_id=31828705\r\n\r\nNote about colour differences: a) RGB axes are not orthogonal, so you cannot use sqrt(R^2+G^2+B^2) formula, b) for colour differences there is more correct (but much more complex) [CIEDE2000](http://en.wikipedia.org/wiki/Color_difference#CIEDE2000) formula (which may easily blow up performance if used blindly) [2].\r\n\r\n[2] https://github.com/neovim/neovim/issues/793#issuecomment-48106948\r\n\r\n**NOT supporting** truecolor\r\n----------------------------\r\n\r\n* [urxvt](http://software.schmorp.de/pkg/rxvt-unicode.html) -  http://lists.schmorp.de/pipermail/rxvt-unicode/2013q3/001826.html \r\n* [Terminlogy](https://www.enlightenment.org/p.php?p=about/terminology) (E17) - https://phab.enlightenment.org/T746\r\n* [mrxvt](https://sourceforge.net/projects/materm) - https://sourceforge.net/p/materm/feature-requests/41/\r\n* [aterm](http://www.afterstep.org/aterm.php) - https://sourceforge.net/p/aterm/feature-requests/23/\r\n* [mintty](https://code.google.com/p/mintty/) (Cygwin and MSYS) - https://code.google.com/p/mintty/issues/detail?id=431\r\n* [fbcon](https://www.kernel.org/doc/Documentation/fb/fbcon.txt) (from linux kernel) - https://bugzilla.kernel.org/show_bug.cgi?id=79551\r\n* FreeBSD console - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191652\r\n* libvte and GTK2 - based:\r\n     * **libvte**-based [GTKTerm2](http://gtkterm.feige.net/)\r\n     * **libvte**-based [stjerm](https://github.com/stjerm/stjerm) - https://github.com/stjerm/stjerm/issues/39\r\n\r\nTerminal multiplexers\r\n---------------------\r\n\r\n* [tmux](http://tmux.sourceforge.net/) (have workaround[3]) - https://sourceforge.net/p/tmux/tickets/140/ and https://www.mail-archive.com/tmux-users@lists.sourceforge.net/msg04720.html\r\n* screen\r\n\r\n[3] Currently you can use tmux_escape option as a workaround if you want true color in shell run under tmux. No true color in tmux statusline though.\r\n\r\nHere are another console programs discussions:\r\n============================================\r\n\r\nSupporting True Color:\r\n\r\n* irssi - https://github.com/irssi/irssi/pull/48\r\n\r\nNot supporting True Color:\r\n\r\n* mutt - http://dev.mutt.org/trac/ticket/3674\r\n* mc - http://www.midnight-commander.org/ticket/3145#comment:1 - demo patches attached\r\n* s-lang library - http://lists.jedsoft.org/lists/slang-users/2014/0000002.html\r\n* ncurses library - https://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00007.html\r\n* termbox library - https://github.com/nsf/termbox/issues/37\r\n* mcabber - https://bitbucket.org/McKael/mcabber-crew/issue/126/support-for-true-color-16-millions-colors\r\n* emacs - http://emacs.1067599.n5.nabble.com/RFC-Add-tty-True-Color-support-td299962.html\r\n* vim - https://bitbucket.org/ZyX_I/vim/commits/branch/24-bit-xterm\r\n* tig - https://github.com/jonas/tig/issues/227\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/1483710-true-color-support-in-both-gui-and-console-application?utm_campaign=plugin&utm_content=tracker%2F461131&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F461131&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/177875618","html_url":"https://github.com/neovim/neovim/issues/59#issuecomment-177875618","issue_url":"https://api.github.com/repos/neovim/neovim/issues/59","id":177875618,"user":{"login":"grawity","id":31021,"avatar_url":"https://avatars.githubusercontent.com/u/31021?v=3","gravatar_id":"","url":"https://api.github.com/users/grawity","html_url":"https://github.com/grawity","followers_url":"https://api.github.com/users/grawity/followers","following_url":"https://api.github.com/users/grawity/following{/other_user}","gists_url":"https://api.github.com/users/grawity/gists{/gist_id}","starred_url":"https://api.github.com/users/grawity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grawity/subscriptions","organizations_url":"https://api.github.com/users/grawity/orgs","repos_url":"https://api.github.com/users/grawity/repos","events_url":"https://api.github.com/users/grawity/events{/privacy}","received_events_url":"https://api.github.com/users/grawity/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T09:35:23Z","updated_at":"2016-02-01T09:35:23Z","body":"Linux v3.13 parses and discards extended color codes: https://github.com/torvalds/linux/commit/3415097ff0529eac264b8ccfa06572871e45c090\r\n\r\nLinux v3.16 translates them to the closest VGA color: https://github.com/torvalds/linux/commit/cec5b2a97a11ade56a701e83044d0a2a984c67b4\r\n\r\ntmux appears to have gained support: https://github.com/ThomasAdam/tmux/commit/427b8204268af5548d09b830e101c59daa095df9"}}