Login
You're viewing the m.mtlynch.io public feed.
  • May 9, 2025, 1:46 PM

    terminal poll: do you ever have problems where there are colours in your terminal which are hard to read because of bad contrast?

    💬 23🔄 0⭐ 0

Replies

  • 💬 1🔄 0⭐ 0
  • May 9, 2025, 1:54 PM

    @xabean oh man getting vim colors to work has been such a journey for me! the only thing that made things work consistently was to use "set termguicolors” and then use a truecolor 24-bit vim theme

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 9, 2025, 1:53 PM

    @b0rk it does not occur too often, but I had to switch to a dark theme. I prefer light themes, but for terminals I use a dark theme, because most CLI that output colors do not handle light themes very well.
    For instance, it is very common to have yellow on white text, which is _very_ difficult to read.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 9, 2025, 2:07 PM

    @b0rk the poll is about terminal colors or application colors in terminals? I have seen terminal themes I have switched away from because some terminal apps were hard to read. f.i. `mc` under default `konsole`.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 2:12 PM

    @b0rk I used to have this problem until I settled on some boring “pro” colour scheme and then forgot about it for years :)

    💬 0🔄 0⭐ 0
  • May 9, 2025, 2:14 PM

    @b0rk
    I use a light theme on everything, even the terminal (because i value readability). Unfortunately, lots of color-happy scripts assume dark backgrounds.

    If it's a one-off use, usually just highlighting the text is enough. If I'm trying a new tool then i check for appropriate themes or it's an immediate uninstall.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 9, 2025, 2:39 PM

    @b0rk Yes, occasionally (when I try to use a new TUI app that forces its own theme that doesn't work with my light background)

    💬 0🔄 0⭐ 0
  • May 9, 2025, 2:41 PM

    @b0rk The struggle is real 😭 Lately I’ve been in various random terminal situations - using Windows terminal to access cloud instance, same thing using MacOS terminal or Iterm, accessing the local CLI, etc. Sometimes the text is barely visible, but I haven’t wanted to spend the time on it. Eagerly awaiting anything you can offer around this 🙏

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 9, 2025, 3:14 PM

    @b0rk In case this is useful: Almost exclusively for programs which seem to be made for dark mode, but I am using a light background. (That said, maybe I need to set my profile colors correctly? I honestly don't know)

    💬 0🔄 0⭐ 0
  • May 9, 2025, 3:17 PM

    @b0rk It's not exactly a true contrast issue, but I prefer using a dark-background terminal, yet vim defaults to assuming a light background. The best solution I've found is using the environment setting COLORFGBG=7;0 , although this requires a little extra ssh client/server config tweak in order to be passed over the network (I wish it was allowed by default)

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • May 9, 2025, 3:50 PM

    @rogaharvey I really wish terminal emulators would just ship with a different dark blue. Feels like a lot of people are suffering unnecessarily.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 3:50 PM

    @b0rk Yes, especially every time some program decides to print the most important information in red text (on my black background).

    My protanopia means that red looks very dark to me, and red on black text is nearly illegible at my usual font size.

    💬 1🔄 0⭐ 0
  • May 9, 2025, 3:52 PM

    @Diziet have you ever reconfigured "red" to display as a different colour that's more legible for you?

    💬 1🔄 0⭐ 0
  • May 9, 2025, 3:56 PM

    @b0rk No. I keep vaguely meaning to fight that particular battle. What I normally do instead is turn off colour support in whatever-it-is.

    💬 1🔄 0⭐ 0
  • May 9, 2025, 3:58 PM

    @b0rk To expand on that: Just changing red to another colour isn't going to be great for me. What I really want is for red on black to be rendered as white on red instead. I don't think many terminal emulators support such a thing.

    (I'm still using xterm and am scared of switching to something else and discovering all the ways my finger macros depend on it.)

    💬 0🔄 0⭐ 0
  • May 9, 2025, 4:01 PM

    @Diziet ah I see! that _would_ be a really cool feature and I've never heard of anyone implementing it either

    💬 1🔄 0⭐ 0
  • May 9, 2025, 4:26 PM

    @b0rk I could totally implement it myself but then I'd be carrying a patch to xterm and ... well, Free Software is great in theory but if in practice if even _I_ won't carry a patch to my ancient, reliable, and hardly-changing terminal emulator, the picture is less rosy in practice.

    💬 1🔄 0⭐ 0
  • May 9, 2025, 4:29 PM

    @Diziet @b0rk stupid workaround idea: interpose a pty-based filter between your shell session and xterm itself which catches SGR escape sequences and rewrites them so that they all use true colour? Then it could make interesting decisions about what colours.

    I have a not-quite-published general framework for pty-based filters which might be a convenient place to start.

    💬 1🔄 0⭐ 0
  • May 9, 2025, 4:31 PM

    @simontatham @b0rk That sounds very interesting! Please publish your thing!

    I was thinking I could probably do it as an X11 proxy if I wanted to go to town...

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • May 9, 2025, 5:15 PM

    @Diziet @b0rk also, I'm happy to help with setting up the SGR-parsing part, leaving you to write the innards of the 'do the interesting bit' function that receives a fg+bg colour pair and emits a replacement one. I think I can probably dash that part off pretty quickly. Shout if you want me to.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • May 9, 2025, 10:11 PM

    @Diziet @b0rk here you go! I've pushed another commit to the filter git repository that adds an experimental "recolour" filter.

    Here's a demo, which shows that it can do _something_ – in this case, reorder the R,G,B channels, in such a way that the ANSI ordering of the default 8 colours turns into the ZX Spectrum ordering, because I was a Spectrum baby and this seemed like a good opportunity to show it.

    So if you grab that, delete the RGB bit twiddling, and replace it by whatever else you feel like trying out, hopefully it'll be a workable platform for experimentation.

    A screenshot of a shell session in a pterm window. In the top half of the window, the prompt is purple, and I've run a command "cat test.txt" which prints eight digits in the standard terminal colours, followed by "ls" which shows source files in shades of yellow and a subdirectory in blue.

In the bottom half, I ran a utility "recolour" which started a subshell. Within that subshell, the colours are permuted so that the prompt is green, the standard terminal colours are reordered from RGB into BRG order, and the ls colours are correspondingly remapped. Then I exited the subshell and the ordinary purple prompt came back.
    💬 1🔄 0⭐ 0
  • May 9, 2025, 10:24 PM

    @simontatham @b0rk Yay :-). Will get that and play about with it.

    Reordering the RGB reminds me: I had a Sinclair QL which liked to use only black, red, green and white (in high res mode). I made a box that sat in the video cable (RGB+sync), with a multipole multiposition switch, so it could reorder/reconnect the wires. IIRC I usually used it on the blue+green setting.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 4:02 PM

    @b0rk I selected "sometimes", even though it is probably less than once a month. I don't use new utilities / programs that often, but when I do, it seems they often default to colors that are usefull only on dark background and I have a light background.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 6:21 PM

    @b0rk
    "Sometimes" and not "often", only because I set an env variable to change directory names to be white instead of blue on my black terminal.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 6:51 PM

    @b0rk I like a white or light background for shell and vim and most other terminal based programs, and haven't yet found color schemes that work flawlessly on light background.

    💬 0🔄 0⭐ 0
  • May 9, 2025, 7:23 PM

    @b0rk I must explain: I have no problems with colour contrast because I configure it away. If that doesn't work, I avoid that particular piece of sh^Hoftware.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 9, 2025, 9:57 PM

    @b0rk I voted "Yes, often" to this poll, because I had this problem all the time in neovim until ~2 days ago when I finally went and figured out how to change the colors of the things that had bad color contrast… (A frustratingly unintuitive process that I kept putting off because I figured it'd be too much of a pain.)

    I think going forward I'll be in the "Yes, sometimes" or "Yes, occasionally" category.

    💬 0🔄 0⭐ 0