开发者

Are there terminals that support true color?

I cannot understand why Apple's default terminal has only 16 colors, iterm2 etc support 256 colors, but X11's terminal supports true color (although its user interface is crappy).

My question is in two parts:

  1. Why, in this day and age, are terminals not able to support higher colors (i.e., higher than 16 and 256)?

    The last time I asked this, I only got rude comments like "Why don't you write one yourself"... I'm asking seriously, because I do not know about what goes into the internals of a terminal and why the constraint. Is it simply because there is no demand?

  2. If I'm wrong and there are good terminals that support true color, could you recommend them?

    My observations are based on a Mac, but other platform answers are welcome to开发者_如何学Goo, because they might be helpful to others.


KDE Konsole has true colour support, i.e. every character can have a different 24-bit colour.

Xterm and most other terminal emulators these days have a palette of 256 colours, whereby each of those colours can be chosen out of the full 24-bit range.


In the older days where terminals originate, they were hardware, and their colourfulness was limited by hardware constraints (i.e. memory shortage). Now we mostly use virtual terminals, which often emulate these older devices in software. So, one point is whether the software terminal actually emulates a device with its historical limitations.

Another point is that there are no conceptual limitations on colours, fonts or anything. This is because terminal is controlled by commands, which are simply special reserved sequences of characters. Commands are not standardized and differ from a terminal to a terminal. And that's exactly why there are virtually no such exotic functions implemented, as it would leave the users with two limiting options:

  • require all terminals to support the feature (which is not practically feasible)
  • limit the usage of the software to few particular terminals which do support the feature (which is highly unpleasant).

The third point I'd notice is that such features are not really needed by majority of people.


I know I'm very late for the party, but I found this : a gist titled "True Color (16 million colors) support in various terminal applications and terminals", which gives information about which terminals support true colour and related discussions in the corresponding communities.


If you're looking for a quick link for Mac OS X, I just got iTerm2 nightly build and it works perfectly with true color: https://iterm2.com/downloads/nightly/#/section/home

To answer the question about why this is useful: I do research on color, and being able to display colors right in the terminal is super useful for debugging/scripting/you name it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜