Lychee colours on macOS Terminal.app
The colour scheme chosen by Lychee renders poorly on the default macOS Terminal.app, making the output hard to read.
Yeah, the yellow and green only work well on dark backgrounds. 🤔 I wonder if there's a "theme switcher" which detects the background color.
That's the default "yellow" colour being used https://github.com/lycheeverse/lychee/blob/caddc9f14ca2d31e8b7f51d9c81ea1d49aaaf3d0/lychee-bin/src/formatters/color.rs#L15
Apple picked a specific colour for yellow that isn't legible on their default background. There isn't really something we can do here.
Some (bad) ideas:
- We pick a specific RGB value in lychee. Now it likely doesn't work in themes with yellow tint (IIRC Apple's Terminal has a paper like theme, or maybe it was iTerm2 🤷). But creators of yellow tinted themes would have picked a colour for "yellow" that works on their background, so our users now have a worse experience than if we didn't do this.
- We try to detect the terminal emulator (https://codeberg.org/dnkl/foot/src/commit/72d9a13c0c6b6ee4b56a38f508c2e8d5c56616b5/doc/foot-ctlseqs.7.scd#L614-L618) and assume it's using the default theme. The code gets more complicated, but the terminal might use a dark or light theme depending on the time of day and we still can't guarantee a good contrast.
- We overwrite "yellow" in Apple Terminal with something that doesn't completely suck (https://codeberg.org/dnkl/foot/src/commit/72d9a13c0c6b6ee4b56a38f508c2e8d5c56616b5/doc/foot-ctlseqs.7.scd#L688-L692 might work). Everybody else is unaffected, we have one simple special case with a
println!()in our code during initialization, first-time user experience on vanilla macOS doesn't completely suck. Might actually work. - Apple remembers that they are a design company and discovers a way to use colours that isn't hostile to the human eye. But that's not gonna happen, this has been the same yellow for as long as I can remember.
IIRC Apple's Terminal has a paper like theme, or maybe it was iTerm2 🤷
Yes, the paper-like Apple Terminal theme is called manpage. It's... something.
We overwrite "yellow" in Apple Terminal with something that doesn't completely suck
Hmmm.... sounds fine with me. 🤔 If someone wants to give that a shot, please do.