Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal.app true/24-bit color: how to log feature request?

Apologies if I overlooked it, but is there any way to register a vote or feature request that Terminal.app support 24-bit color? There are some other terminal emulators out there (iTerm being the main I've found) that do so, but they are otherwise not as well-built and useful as Terminal.app. But it would for sure be nice to get more colors out of Terminal.app.

MacBook Pro 15”, macOS 10.14

Posted on Jul 2, 2019 10:08 AM

Reply
Question marked as Best reply

Posted on Jul 2, 2019 10:12 AM

Ap[ple Feedback, take a couple of million others with you...


https://www.apple.com/feedback/macos.html

17 replies

Jul 3, 2019 6:19 AM in response to jgoldbg

...(iTerm being the main I've found) that do so, but they are otherwise not as well-built and useful as Terminal.app...

I would disagree, as I use iTerm2 every day, at work, all day long, as I'm a Unix file system developer and I live inside of a terminal emulator ssh'ed to half a dozen different Unix systems, with 4 iTerm2 windows open and about 30 active tabs.


iTerm2 is a wonderful terminal emulator.


While I advocate iTerm2 at work, I cannot get some developers to switch, so I end up trying to at least improve their Terminal experience, as some of them still treat the terminal emulator as just a keyboard and a screen from the days when it was just a dumb physical Digital Equipment Corporation VT100 terminal.


NOTE: Terminal is a much better terminal emulator than back in the Cheetah 10.0, Puma 10.1, Jaguar 10.2, Panther 10.3 days. It has come a long way, but I do not think a lot of developers in the macOS development group really use a terminal emulator. Where as, I think the people evolving iTerm2 actually use a terminal emulator.


Granted as an open source project, iTerm2 does tend to have the "Kitchen Sink" included, and sometimes navigating the preferences can be challenging.


Some iTerm2 features I find very useful:

  • I can tell it what characters are part of a word, so double clicking can select a full path, and I do not need to do the click and drag to select a file path. A very frequent operation when working in a terminal emulator.
  • I can have selected text automatically put into the clipboard. I do not need to Command-C. At best Terminal has a keyboard shortcut to paste the selected text, but that ONLY works inside Terminal. If I want to paste that selected text in an email or other document, I have to actually remember to Command-C first.
  • The ITERM_SESSION_ID environment variable created for each window and tab includes unique Window number, tab number and split screen number, that my .bash_profile can use to match up my shell command history to that window/tab/split ITERM_SESSION_ID=w1t2p0:B2082A39-30BE-4840-BD7C-E40102753C10
  • iTerm2 can control a remote tmux session using the regular iTerm2 menus to create new tmux sessions.
  • When I specify an ssh command as part of a profile, I have an extra field I can use to specify the first command I want to run on the remote system, such as starting a tmux (or GNU screen) session, or entering a software development view. Very handy.
  • I can easily assign a hotkey shortcut to a profile so if I need to create a new tab or window to remote system Q, I just hit the hotkey and I have a new tab or window ssh'ing to that system. This is much more difficult to setup for Terminal. Not impossible, but not obvious and not nearly as flexible.
  • I can color my tabs, and there are iTerm2 escape sequences so I can change the tab color via programs and scripts running in my iTerm2 window/tab. Very handy when you have 30 tabs to have color clues.


There are other features I'm sure I depend on everyday, that just are just programmed into my fingers that I forget they exist. And as I said, it has a "Kitchen Sink" but I do not use every feature it has, as I do not need them.


So anyway, I disagree that iTerm2 is not as well built as Terminal. And I'm not saying Terminal is bad, just that iTerm2 has better features for a developer that lives inside of terminal emulators all day long. And iTerm2 has 24-bit color support 😀

Jul 2, 2019 12:05 PM in response to jgoldbg

I had no trouble at all assigning any 24 bit color I wanted to the background, text and highlight. They are precisely the colors I chose. Not the nearest 8 bit interpretation.



Yes, I realize there are two rows of color swatches labeled as ANSI Colors, but they don't mean much since you aren't forced to use that limited choice of colors.

Jul 2, 2019 5:29 PM in response to jgoldbg

No one from Apple is going to say anything in this forum. It is a user-to-user technical support forum, with the key word being 'user'.


FYI: iTerm2 has 24 bit color

256 Colors (or more!)
With 256-color mode, Vim explodes with photorealism: the terminal is a
medley of color and code comes alive. In version 3, 24-bit color is
supported.



https://gist.github.com/XVilka/8346728

says Terminal.app does not support 24 bit colors.


The script that generated the above iTerm2 output generated the following in Terminal


So either Terminal is not supporting the same escape sequences, or it is having difficulties displaying 24 bit colors.

Jul 3, 2019 8:06 AM in response to BobHarris

I thought that output looked familiar. 🤓


I actually use tput sequences to assign colors to my Terminal prompts, and the Terminal preferences to govern the background and cursor color.


TPUT="/usr/bin/tput"
Bluebld="$(${TPUT} bold; ${TPUT} setaf 63)"
White="$(${TPUT} bold; ${TPUT} setaf 15)"
Green="$(${TPUT} bold; ${TPUT} setaf 42)"
Normal="$(${TPUT} sgr0)"
MyHost="$(networksetup -getcomputername)"

export PS1='\[$Bluebld\]$MyHost: \w\$ \[$White\]'


Jul 3, 2019 5:24 PM in response to VikingOSX

Re: VikingOSX


Here is one of my less complex command prompts:



But my initial coloring started out coding the actual escape sequences. This is long before I learned about tput.

PS1="\D{%d%a@%R}[\[\e[44;36;1m\]Bob\[\e[44;31;1m\]Touch\[\e[44;32;1m\]Pro\[\e[0m\]]\[\e[34;1m\]$(__cwd 3)\[\e[0m\]> "


$(__cwd 3) is a shell function that returns the last 3 directories in a very long path, and will substitute ~ for my home directory.


And to make it interesting, my .bashrc has about 15 of these PS1 assignments, each customized for different remote systems I use, so the colors are unique depending on which system I'm ssh'ed into (the .bashrc is replicated to all nodes, and in some cases my /home is a NIS/LDAP NFS mounted /home).


Jul 2, 2019 11:36 AM in response to Kurt Lang

Kurt Lang -- That allows me to choose which color to assign to a subset of the 256 ANSI colors which will be rendered within the terminal, but it doesn't mean that the terminal itself will properly render arbitrary 24-bit colors. A reasonably authoritative discussion can be found at https://gist.github.com/XVilka/8346728 .


BDAqua -- Thanks. I'll at least throw my 2c in there.

Jul 2, 2019 1:39 PM in response to Kurt Lang

I'm not sure how that addresses the concerns I'm raising, and which are documented in the discussion to which I linked. Specifically, what do you get when you follow the instructions from the link I posted and run the following command in your terminal?


printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"


Do you see "TRUECOLOR" printed in red? If so then that's amazing since it means you've found a way to enable true color escape sequence handling in your version of Terminal.app, and so I'd like to know more about how you did it. If on the other hand you just get plain, uncolored (or worse, garbled) text, then I think you may be misunderstanding the request here.

Jul 2, 2019 1:52 PM in response to jgoldbg

Until now, I couldn't see how your question had anything to do causing the text in a command to print a particular color.


But it would for sure be nice to get more colors out of Terminal.app. … and … but it doesn't mean that the terminal itself will properly render arbitrary 24-bit colors.


Those earlier statements only told me you wanted to user 24 bit color in Terminal's interface.


I did kind of gloss over the link. Running the command does what you likely expect. I get the word TRUECOLOR in black rather than red.


No offense meant, but I guess I don't see why this is important.

Jul 2, 2019 2:41 PM in response to Kurt Lang

No offense taken! Indeed, it isn't important in any objective sense, and I'm willing to continue living without it rather than accepting some other more serious drawbacks of things like iTerm. But many of the newer themes for apps like Vim, which are designed by people with substantial UX experience and which would ultimately be softer on my eyes and more pleasant over the course of a long day of work, require true color support.

Jul 2, 2019 3:01 PM in response to jgoldbg

Ah, then that comes back (I think) to my original reply. If you're just trying to get away from the default black on white display, you can use one of the presets in Terminal's preferences. Or, as I did above, create a new color scheme (the one named Test) to be whatever you prefer. Red text on a dark gray background. Blue on orange. Etc.

Jul 2, 2019 3:11 PM in response to Kurt Lang

Thanks. That doesn't address the problem. The colorschemes that take advantage of true color often make use of more than just 256 colors (remember there are 24 million choices available to these schemes' authors). Among the maintenance drawbacks of the approach you suggest, it also would be theoretically impossible for any scheme utilizing more than 256 colors, since that would mean some colors must go unmapped.


I appreciate your attempts to help, but I'm going to let the conversation rest here. If someone from Apple decides to weigh in and clarify that's fine, but I believe there are simply no true options, barring changes to Terminal.app's handling of color sequences, to get me what I'd like.

Jul 3, 2019 12:50 PM in response to BobHarris

Lest it be here for posterity unamended, I should say that I regret saying that iTerm is not "well-built". For sure it is, and George Nachman's work on it is very impressive. What I should have said is that it lacks key features that I require for my work:


https://gitlab.com/gnachman/iterm2/issues/1611

https://gitlab.com/gnachman/iterm2/issues/4213


So, hopefully one day either the Apple Terminal team will add 24-bit color, or the iTerm team will address the issues above. But in any event, I do applaud George and others' work.


Terminal.app true/24-bit color: how to log feature request?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.