Hacker News new | past | comments | ask | show | jobs | submit login
True Color support in various terminals and applications (gist.github.com)
75 points by xvilka on July 6, 2014 | hide | past | web | favorite | 18 comments

Why would I want that? Serious question.

Color support is important, but 256 has served me well for decades. Can't think of a single program that would benefit from more colors. Unless, of course, you're trying to watch ASCII-videos.

Some things I can think of:

- Themes, its nice to have the same color scheme across your programs. You can always redefine your 16 base colors in the terminal and map these to syntax in your terminal program (e.g. vi), but it's cleaner to have the rgb colors directly in your theme file, especially if you switch themes (I don't do it too often, but I like to change colors every month or so to keep it looking fresh)

- If you code CSS, it would be nice to have preview of #336699 colors in your editor. To implement that, you need real color support.

- And, less important, for those who play nethack-style games it's probably nice.

Recently, I set a background color for the 80th column in Vim. The gray nearest to the default bg color wasn't as subtle as I'd have liked.

Because my fave 256 aren't the same as yours, and palette switching is a huge pain. see for example what a pain it is to get Solarized working across both terminal and X and ssh sessions, in vim and emacs.

Image previews in Ranger. http://ranger.nongnu.org

Kind of a side rant but I've often wondered why Apple doesn't put more effort into making Terminal.app better. Macs are rather popular amongst certain types of developers and making their life easier is a nice way to make sure they'll keep on using Macs.

How do you add something like this to ANSI ?

I'd like to add annotations to regions of the screen about which file / directory a region mentions.

In this way an aware terminal could let you open files by right clicking in the terminal, or change directory etc.

You could even run a program under the shell to check which files were opened and annotate areas if they are mentioned.

Read ECMA-48¹, which is the free (as in beer) printing of the ‘ANSI’ terminal controls standard. If you want to supply text (like a file name), you'd probably use an OSC command ESC ] Ps ; Pt ST with a Ps that no one else is using. To mark the start and end of a region, you'd probably use a pair of control sequences (CSI) analogous to START / END OF SELECTED AREA, from a private use range.

(The true-color sequence comes from an ITU recommended extension / future version, T.416². It would be interesting for the OP site to list which terminals support the full proposal, including CMY an CMYK specifications, as well as RGB.)

¹ http://www.ecma-international.org/publications/files/ECMA-ST... ² http://handle.itu.int/11.1002/1000/2546-en?locatt=format:pdf

Some terminals already detect URLs by pattern and make them clickable. You could also add an escape sequence to create the annotation you describe, then modify a terminal app to support the sequence. However, terminals don't always display trusted data, so it's very risky to add escape sequences that do anything more than display formatted text.

For example, there are sequences defined to change the title of the terminal window or print to a printer, but they are frequently disabled or left unsupported for security reasons.

Wait, we're settling for 24-bit color? With HDMI and modern image and video formats supporting 10-bit and 16-bit channels, I need a terminal that can support Deep Color.

True HD color with 64-bit depth, including a 16-bit alpha channel, is the minimum future programmers will demand to syntax highlight our source code and identify monsters in Nethack.

iTerm 2 is supposed to have support but I'm not having any luck (https://www.dropbox.com/s/xvl46l7ti9sqv9o/Screenshot%202014-...)

It's only in the nightly builds


Seems completely unnecessary to me.

Terribly useful to me. For one, I can have vim themes that match my other styles in other programs.

(Not to mention we should have drawing support implemented IN the terminal by now).

Yes! We need a website that encourages terminals and applications to use 24bit colour.

Sarcasm? I find it sometimes hard to tell around here.

But seriously, I like the meta-idea of putting up a site to promote a technology; with a list of compliant apps for users, and information how to implement it for the developers. I'm thinking about making a site that catalogues DPI aware software for windows (like Macs "Retina"), because its annoying how many programs don't support high DPI screens properly, and its notoriously hard to do for developers.

I should really do the same for focus follows mouse appson windows.

Actually, I wasn't being sarcastic.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact