Chris's Wiki :: blog/unix/TerminalColoursNotTheSame Commentshttps://utcc.utoronto.ca/~cks/space/blog/unix/TerminalColoursNotTheSame?atomcommentsDWiki2023-03-10T10:08:03ZRecent comments in Chris's Wiki :: blog/unix/TerminalColoursNotTheSame.By Ricardo Bánffy on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:cf8791a3b4c4e60d4ab81c6a18247bdf7b4211a5Ricardo Bánffyhttps://about.me/rbanffy<div class="wikitext"><p>Don't be too harsh on how terminal emulators render colors - physical ones are not that much better.</p>
<p>A lot can be blamed on the inconsistent implementations of RGBi signals in color TTL monitors in the 80's - while most manufacturers of CGA monitors tried to emulate IBM's scheme, even IBM couldn't make its 16 color palette consistent between CGA, EGA, VGA, and the mainframe/midrange (3270/5150, etc) terminals. This whole space is kind of a mess.</p>
<p>I myself customize my terminals to either a very dark unsaturated blue background with a roughly 70% intensity bluish-white or a 70% green on a 5% green background. Physical terminals, unfortunately, usually end up looking whatever the engineers (who really didn't think much about how we perceive colors) originally intended, plus natural aging of analog components.</p>
<p>Minor inconsistencies should be OK, anyway. I just hope most terminal writers pool their resources under projects such as VTE or QtTermWidget and incorporate those into their programs so there is at least one reference implementation going forward.</p>
</div>2023-03-10T10:08:03ZBy Ian aka nobrowser on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:022335136aaa5357027c2cf33587c9555452fc9eIan aka nobrowser<div class="wikitext"><p>On the other hand there is the <a href="https://github.com/altercation/solarized">solarized</a> theme, which to me is so far washed out to be hardly readable. In any case, the idea of trying to have the same set of foregrounds work for both light and dark backgrounds seems to aim for suboptimality from the start.</p>
</div>2023-03-09T04:39:07ZBy Verisimilitude on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:e577ab17960532191cdffef9299f5e4bfced85a4Verisimilitudehttp://verisimilitudes.net<div class="wikitext"><p>This is the intended behaviour of the basic colour control codes.</p>
<blockquote><p>I'd like to put this forward as a reason for people to entirely avoid using colours in terminal programs and terminal environments, but I know that ship has sailed years ago.</p>
</blockquote>
<p>Not all of us are stuck in the 1970s and believe minor additions that came later to be bad.</p>
<blockquote><p>Apparently other people have found or set up colour sets in their terminals that they like and find a lot more readable than I do with any setup that I've seen.</p>
</blockquote>
<p>It's easier to cope with ECMA-48 terminal control codes, despite how UNIX implementations break them or avoid features, than to cope with X11.</p>
</div>2023-03-08T18:51:17ZFrom 148.77.89.22 on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:0ef4cfe98d68c6c66a94a4060781f504f5d9822eFrom 148.77.89.22<div class="wikitext"><p>The color explosion problem is caused mainly by the use of the RGB color scheme being naively implemented by tech people who don't understand colors. The typical tech approach is to setup colors using the idea of "just max it out". So red is #FF0000, green is #00FF00, blue is #0000FF, where each color is just set to the max value for its component.</p>
<p>The thing is that human eye doesn't work this way and the max value #00FF00 of green is not perceived to be the same brightness as the max value of #0000FF blue. The CIELAB (and variants) color space has been painstakingly designed over many decades to ensure that colors have a visual similarity across the spectrum, as they are perceived by the human eye. It ensures that all colors have the same apparent brightness, etc.</p>
<p>If tech people spent some time actually thinking about these types of topics and setting software to use sane defaults, it would make the use of colors much more pleasant for everyone.</p>
</div>2023-03-08T15:45:08ZFrom 193.219.181.242 on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:0a8141d1265a0293ee2788a4a9383f3bef06b5e8From 193.219.181.242<div class="wikitext"><p>I don't think the variation is a strong reason to avoid color usage; a +/- diff in green/red still looks like a diff in green/red regardless of the exact shades being used. Assuming it's still decently readable green/red, that is (some terminals stick to some variant of "historic VGA" colors where blue is nigh-invisible on a black background...)</p>
<p>While the 8/16-color palettes indeed differ a lot, the 256-color "6x6x6" ones are much more consistent (and usually not customizable) – and easier to find a non-eye-damaging color from. Increasingly more terminal emulators support full-on 8x8x8 RGB "direct color".</p>
<p>gnome-terminal has two main color schemes to choose from (ignoring the bad ones) – the new "GNOME" scheme starting with v40 or so:</p>
<pre>
XTerm*color0: #171421
XTerm*color1: #c01c28
XTerm*color2: #26a269
XTerm*color3: #a2734c
XTerm*color4: #12488b
XTerm*color5: #a347ba
XTerm*color6: #2aa1b3
XTerm*color7: #d0cfcc
XTerm*color8: #5e5c64
XTerm*color9: #f66151
XTerm*color10: #33d17a
XTerm*color11: #e9ad0c
XTerm*color12: #2a7bde
XTerm*color13: #c061cb
XTerm*color14: #33c7de
XTerm*color15: #ffffff
XTerm*boldColors: true
XTerm*boldMode: true
</pre>
<p>and the older "Tango" theme (GNOME 2.x brand colors) that was still the default in all 3.x versions:</p>
<pre>
XTerm*color0: #000000
XTerm*color1: #cc0000
XTerm*color2: #4e9a06
XTerm*color3: #c4a000
XTerm*color4: #3465a4
XTerm*color5: #75507b
XTerm*color6: #06989a
XTerm*color7: #d3d7cf
XTerm*color8: #555753
XTerm*color9: #ef2929
XTerm*color10: #8ae234
XTerm*color11: #fce94f
XTerm*color12: #729fcf
XTerm*color13: #ad7fa8
XTerm*color14: #34e2e2
XTerm*color15: #eeeeec
XTerm*boldColors: true
XTerm*boldMode: true
</pre>
<p>---</p>
<p>While browsing my configuration, I was reminded of something interesting about the two terminals (xterm and gnome-terminal) unrelated to colors. Sometimes I use a quite old 32-bit laptop for some casual linuxing, instead of the more modern machines, and I had a thought about switching it from gnome-terminal ot xterm for a more "traditional X11" experience… and it turned out that Xft-based fonts were <em>so</em> slow in xterm that it took whole seconds to render an 1024x768 screen. Whereas gnome-terminal was still as fast on the old Pentium (even with it being deliberately in 800 MHz "power-save" mode) as it was on the modern systems.</p>
</div>2023-03-08T11:45:42ZBy Sotiris Tsimbonis on /blog/unix/TerminalColoursNotTheSametag:CSpace:blog/unix/TerminalColoursNotTheSame:ea6d9f316d8ad3f339f93da22978cd905e8e33eeSotiris Tsimbonishttps://stsimb.irc.gr/<div class="wikitext"><p>The only use of color I tolerate in my terminal is <code>grep --color</code> which conveniently highlights the matches, especially when doing <code>tail -f file | grep --color regexp</code>...</p>
</div>2023-03-08T07:44:35Z