True Colour support in various terminals
gist.github.com
True Colour support in various terminals
1–10 of 28 posts
Re: True Colour support in various terminals
#2https://webkit.org/blog/6682/improving-color-on-the-web/ https://webkit.org/blog-files/color-gamut/comparison.html
Re: True Colour support in various terminals
#3Serious question: will terminals ever support P3 color? Maybe that's too much to ask for? https://webkit.org/blog/6682/improving-color-on-the-web/ https://webkit.org/blog-files/color-gamut/comparison.html
Re: True Colour support in various terminals
#4Serious question: will terminals ever support P3 color? Maybe that's too much to ask for? https://webkit.org/blog/6682/improving-color-on-the-web/ https://webkit.org/blog-files/color-gamut/comparison.html
It only improves images, no?
Re: True Colour support in various terminals
#5Earlier quoted context omitted.
It only improves images, no?
It's a wider color space. It improves the color range of everything, assuming the source hasn't been flattened to SRGB.
Re: True Colour support in various terminals
#6Re: True Colour support in various terminals
#7The current approach used by terminfo and ncurses is to refer to an index within a palette, which has the drawback of giving little guarantees about the final shade of the color. (Look at the color table here [1] for a comparison among different terminals; here it is stated that xterm changed the RGB components of two shades of blue from one version to another!)
Allowing true colors in terminals would make curses programming very similar to what you do in HTML and CSS, where you directly specify the color you want. It would surely be a nice improvement.
Re: True Colour support in various terminals
#8 function img { for image in "$@"; do convert -thumbnail $(tput cols) "$image" txt:- | awk -F '[)(,]' '!/^#/{gsub(/ /,"");printf"\033[48;2;"$8";"$9";"$10"m "}'; echo -e "\e[0;0m"; done ;}
Example: http://i.imgur.com/d5RzWAC.pngRe: True Colour support in various terminals
#9I tweaked the "img" script linked from the article to download and display an image, so I don't need to leave the terminal.
img http://sipi.usc.edu/database/preview/misc/4.2.03.png
My result is this, in Konsole (KDE): http://i.imgur.com/34fjSas.pngRe: True Colour support in various terminals
#10Here is an image printing function for bash/zsh: function img { for image in "$@"; do convert -thumbnail $(tput cols) "$image" txt:- | awk -F '[)(,]' '!/^#/{gsub(/ /,"");printf"\033[48;2;"$8";"$9";"$10"m "}'; echo -e "\e[0;0m"; done ;} Example: http://i.imgur.com/d5RzWAC.png
With that, I see this: http://i.imgur.com/uqCHAmF.png
[1] https://git.gnome.org/browse/vte/tree/perf/img.sh?h=vte-0-36