Low contrast of option values in help in macOS default Terminal in light theme
We've got a report about the CLI help's low contrast in macOS's default Basic theme when the OS appearance is set to Light mode.
Indeed the color of the option values in the help is really bright in this theme:
This is strange because in other light themes the values seemed OK. For example in the Tango light theme on Windows Terminal, we can see very clearly the option values:
Is there anything we can do on our side to smooth these things out?
The style for that text is warning + muted, so you can adjust either of those theme styles by setting the Terminal on your context, or override styleMetavar of you help formatter to apply a different style.
I guess I could do this, but that would just work around the problem on my side.
Since I'm using Clikt's default theme (for the most part), I guess it's better if this is fixed upstream in the library defaults. Basically DEFAULT_YELLOW + dim=true yields a poor contrast in light themes.
Also, why does the style look so different in different terminals/OSes? The DEFAULT_YELLOW color seems to be set as RGB, so I wouldn't expect variations here. Is it about the behavior of dim=true?
I assume so; dim is interpreted differently on different consoles. Happy to accept a better RGB value if you have one, although keep in mind that there's no way to detect the terminal theme, so it will be the same color in light and dark mode.
although keep in mind that there's no way to detect the terminal theme, so it will be the same color in light and dark mode.
Yeah I've been there for the "inline code spans" markdown color (see https://youtrack.jetbrains.com/issue/AMPER-4433/Markdown-code-spans-background-is-too-intense-on-light-theme-in-CLI-help). By the way, I could contribute this change back to Mordant if you're interested, because the default style for inline code spans in markdown has a very low contrast. I ended up using some green akin to what Google Docs does when using markdown backticks, with a carefully tuned shade so the contrast is acceptable on both light and dark backgrounds.
Back to the option values style, do you mean that we could avoid dim and use a plain RGB value for these? I wonder if we would find something acceptable. As far as I understood, dim is a way to reduce the contrast of the color without having to know the color theme, which is nice. I wonder if this should be considered an issue of the default macOS theme 🤔
I think adjusting the RGB color for warning to be more readable is the best solution. I'd be happy to use any values you came up with.