← Back to context

Comment by donatj

4 days ago

> provide a [...] consistent experience

Please just don't. This is not the web.

Color usage in the terminal should be largely semantic, not stylistic.

Speaking for the group of people I know and work with, we don't want a "consistent experience" and hate TUIs that try to manhandle the color palette. Use color sparingly and with intention. Respect that different people have different settings.

First, I make third-party Vim colorschemes, not app. People install my colorschemes because they like the colors, not because I'm a monster with a gun pointed at their face. No one is harmed. No one is forced to do anything they don't want.

Outside of my text editor, where colors matter a lot to me for syntax highlighting, I'm definitely in the NO_COLORS camp (and in the NO_EMOJI camp, nowadays).

> Color usage in the terminal should be largely semantic, not stylistic.

I wholeheartedly agree but 0-15 sadly have zero inherent semantics, which is the single reason behind every terminal colors-related drama since forever: developer choses 9 to highlight an error message because it is generally a bright red by default --> user sets 9 to whatever makes sense to them --> error message is illegible.

  • It would be much better if application developers (and web developers, too) -only- had access to semantic color labels like TEXT, BACKGROUND, ERROR, WARNING, INFO, HIGHLIGHT, and so on, rather than red, yellow, blue, green, black.

    I don’t want my applications to decide “this element must be red text on green background.” I want my applications to annotate the UI with things like “warning message” and “title.”

    • That could be done with a few influential terminal emulators adopting a consensus extension to ISO8613-6, like this: ESC[38:99:‹purpose›m for foreground, ESC[48:99:‹purpose›m for background.

      e.g.

          Foreground     Background    Purpose
          -----------    -----------   -------
          ESC[38:99:0m    ESC[48:99:0m   normal ( same as ESC[39m and ESC[49m )
          ESC[38:99:1m    ESC[48:99:1m   emphasise
          ESC[38:99:2m    ESC[48:99:2m   de-emphasise
          ESC[38:99:3m    ESC[48:99:3m   error
          ESC[38:99:4m    ESC[48:99:4m   warning
          ESC[38:99:5m    ESC[48:99:5m   caution
          ESC[38:99:6m    ESC[48:99:6m   notice
      

      Then people (themes) could easily choose foreground colour or background highlighting for particular roles. Some terminal emulators might also choose to configure other stylistic choices like bold, italic, etc.

      (I believe ISO8613-6 defines sub-modes 0 through 5 (te;db), with 2 (rgb) and 5 (256-color indexed) being most widely implemented. But some terminals historically mess up : and ; in CSI sequences, and I know at least one would interpret ESC[38:6:1m as ESC[6;1m (blinking bold!), so here I pick 99 (ECMA-48 defines modes up to 65).)

      6 replies →

  • My proposal would be to define a set of intents for 0-15 with sensible defaults and let terminal themes assign any color they would like to those. 0 would be background, 7 for foreground , 1 for highlight, 3 for titles, 4 for frames and from there work on backgrounds also..

  • Can you link to your Vim colorschemes? I have a light and a dark one that I hacked over the years but I'm always looking for new ones.

I thought we had left TUIs behind in the 90's, instead it is rainbowns, unicorns, and whatever else going with those stylisic experiences.

  • Good TUI's arent bad for POS terminals and the like, where speed it's king, kinda like airports where the latency it's a matter of life of death. For everything else, just look at IBM: you have the old TUI with 3270 terminals and web 'bindings' to these to accomplish the same exact task but with a GUI interface.

    But OFC some airport assistant has an AS400 console on it and that's it sending commands at blitzing speeds. These interfaces have sense there; but not for a modern desktop OS shell as the main debugging environment.

Yes, and giving developers control over colors, text size, typeface and so on has also been a usability and accessibility disaster on the web, too! The user should have this control.