{"action":"closed","issue":{"url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/9","repository_url":"https://api.github.com/repos/ogham/rust-ansi-term","labels_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/9/comments","events_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/9/events","html_url":"https://github.com/ogham/rust-ansi-term/issues/9","id":135502213,"number":9,"title":"TrueColor support","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":[],"state":"closed","locked":false,"assignee":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-22T18:32:34Z","updated_at":"2016-06-21T20:37:47Z","closed_at":"2016-06-21T20:37:47Z","body":"True color specify the color in RGB format like this:\r\n```\r\nprintf \"\\x1b[${bg};2;${red};${green};${blue}m\\n\"\r\n```\r\n\r\nThe 256 colour palete is configured at start, and it's a 666 cube of\r\ncolours, each of them defined as a 24bit (888 rgb) colour.\r\n\r\nThis means that current support can only display 256 different colours\r\nin the terminal, while truecolour means that you can display 16 milion\r\ndifferent colours at the same time.\r\n\r\nTruecolour escape codes doesnt uses a colour palete. It just specifies the\r\ncolour 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 https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh\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* or just run this:\r\n```sh\r\nawk 'BEGIN{\r\n    s=\"/\\\\/\\\\/\\\\/\\\\/\\\\\"; s=s s s s s s s s;\r\n    for (colnum = 0; colnum<77; colnum++) {\r\n        r = 255-(colnum*255/76);\r\n        g = (colnum*510/76);\r\n        b = (colnum*255/76);\r\n        if (g>255) g = 510-g;\r\n        printf \"\\033[48;2;%d;%d;%dm\", r,g,b;\r\n        printf \"\\033[38;2;%d;%d;%dm\", 255-r,255-g,255-b;\r\n        printf \"%s\\033[0m\", substr(s,colnum+1,1);\r\n    }\r\n    printf \"\\n\";\r\n}'\r\n```\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\nCurrently, there is no support for the 24-bit colour descriptions in the terminfo/termcap database and utilites.\r\nSee the discussion thread here: https://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00007.html\r\n\r\nAt this point a lot of terminals have good support for 24-bit color (except rxvt-unicode and Terminology).\r\nSee more information here: https://gist.github.com/XVilka/8346728"}}
{"actor":{"display_login":"ogham"}}