6 ms·
> please please please don't use RGB values in your terminal colour Can you clarify what your suggestion is please? I assume you're talking about ANSI color es
by da39a3ee 6y ago
> please please please don't use RGB values in your terminal colour
Can you clarify what your suggestion is please? I assume you're talking about ANSI color escape sequences. There are 3 different ways colors are represented using ANSI color escape sequences (see https://en.wikipedia.org/wiki/ANSI_escape_code#Colors https://en.wikipedia.org/wiki/ANSI_escape_code#Colors)
1. Using the 16-color palette which is dynamic and under user control.
2. Using the 256-color palette, which are hardcoded colors.
3. Specifying 24-bit colors (RGB), which also hard-coded colors.
Are you asking developers of terminal applications to use neither (2) nor (3)? If so, that seems like an extraordinary, and inappropriate, request. I do hope however that developers of terminal applications make it possible to configure the application to use (1).
For example, do you disapprove of the existence of all syntax highlighting color themes unless they use only the base 16 colors?
- 0xffff2 6y agoNot OP, and not constrained by any accessibility needs, but restricting your terminal applications to (1) sounds entirely reasonable to me. At the very least, (2) and (3) should be entirely opt-in, never defaults.
- kergonath 6y agoOr specific uses (someone else thread mentioned image rendering; I really like the sixel terminal in gnuplot to eyeball stuff from a server without bothering with X; there are plenty other uses for high-resolution full rgb graphics in a terminal).
- da39a3ee 6y agoWhat about syntax-highlighting color themes? Although a subset of color themes (e.g. base16) are specifically designed to use the dynamic 16-color palette, my understanding is that it's routine in the color-theme world to allow yourself to hardcode colors from the 256-color palette. So an application making use of syntax-highlighting color themes would certainly make 256 color support default, wouldn't it?
- 0xffff2 6y agoI don't user a terminal-based editor very often, but my vim syntax highlighting uses the basic 16 colors and it works just fine for me. Personally I think a lot of syntax highlighting is noise anyway. But again, I don't really have a problem with more colors being an option. There are few things that I love more than tweaking and customizing my editor. I just want the out of the box configuration to be dead simple. Any number of options is fine, but your application damn well better display correctly regardless of my color settings, which is so much more likely if you stick to using the 16 colors I get to manage myself.
- hnlmorg 6y agoThis is a weirdly specific edge case and it really depends on what type of application is using the syntax highlighting. For example if it's designed to be a generic `cat` or `man` type utility then I'd suggest sticking with 16 colours. However if it's intending to be a fully featured TUI IDE then something like that would expect the user to configure the application before using it in any significant way and thus using 256 or true colours is more reasonable. As it happens, I have actually implemented syntax highlighting into one of my open source projects and I stuck with the 16-colour palette. There's only so many unique colours you'd want to use before the screen becomes a mess anyway.
- da39a3ee 6y agoOK, I think the problem was that your original post was much too strongly worded. It sounded like you thought that there was no role at all for 256-color and RGB ASCII escape color sequences. But that's clearly not true: just look at a terminal application like bat (a syntax-highlighting cat replacement), which is very popular, and uses sublime color themes most of which use hardcoded colors. In fact, nowadays, when I use the terminal applications that I use most frequently, I make use of their 256-color and full RGB capabilities. But, nevertheless, all the applications I have in mind allow the user to escape hardcoded colors and use the 16 color palette to be used. But, they do not default to 16-color palette: for example, bat's default theme is Monokai Extended (https://github.com/jonschlinkert/sublime-monokai-extended https://github.com/jonschlinkert/sublime-monokai-extended). So, as politely as possible, I do suggest that you should get off your high horse; yes people recognize the importance of supporting the 16-color palette but no, it's not some sort of obviously evil abomination to support and even default to hardcoded 256-colors and RGB colors. Quite to the contrary, there are several use cases among modern, popular, terminal applications. They involve color-rich scenarios such as syntax highlighting. Don't get me wrong though, we're largely in agreement. I wouldn't want a normal terminal app to hard-code, say, a yellow color, which is only visible to users of dark terminal backgrounds, but hopeless on a white background.
- JdeBP 6y agoActually, there are at least six. And the "E" in "ECMA" does not stand for "ANSI", nor does the "I" in "ITU". (-: * https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47710f355c5c0417a/source/TerminalCapabilities.h#L15 https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47... * http://jdebp.uk./Softwares/nosh/guide/commands/TerminalCapabilities.xml#VARIABLEABILITIES http://jdebp.uk./Softwares/nosh/guide/commands/TerminalCapab...