Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANSI Color for gray comes up black on MacOS terminal #137

Open
xemjeff opened this issue May 28, 2022 · 3 comments
Open

ANSI Color for gray comes up black on MacOS terminal #137

xemjeff opened this issue May 28, 2022 · 3 comments

Comments

@xemjeff
Copy link

xemjeff commented May 28, 2022

When I build and use wren_cli with a dark them on MacOS, the gray color comes up as black, and so is invisible.
This is the color used for the command prompt, and many other items (like braces, dot, parens, etc).

I found that changing the static color value in src/module/repl.wren fixes the problem for me.
But I would like verification from others on MacOS and also LInux (KDE, Gnome).

Here's the simple code change, around line 400 in repl.wren.

  //static gray { "\x1b[30;1m" }
  static gray { "\x1b[38;5;8m" }

If you make the change, you need to regenerate the repl.wren.inc file using :

util/wren_to_c_string.py

Let me know. If others have this problem, I can fork the repo as send over a pull request (PR).

@joshgoebel
Copy link
Contributor

In many setups dark gray (in the 16 colors) turns out to be black... that's actually the correct color if that's what the theme specifies... the problem here I think is really we should be using the "default color", not grey... so that would be a different fix.

@andydude
Copy link

It also fails to be visible on Ubuntu Gnome Terminal with any of the Dark modes.

@joshgoebel
Copy link
Contributor

joshgoebel commented Jul 20, 2023

Looking at this again 30;1 should be BLACK BOLD/BRIGHT, ie "light grey/black"... BLACK non-BOLD would be dark grey / absolute black.

https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797

Most terminals, apart from the basic set of 8 colors, also support the "bright" or "bold" colors. These have their own set of codes, mirroring the normal colors, but with an additional ;1 in their codes:

If a theme is setting 30;1 to black that sounds like a broken them IMHO... but again if someone rmakes a good argument what we really mean is "default" vs "grey" we could perhaps witch to the default color (39) in the place of grey in those places that made sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants