uiua-lang/uiua

support light terminal theme

Closed this issue · 6 comments

Related to #224 because the core issue was not solved.

REPL and console output is unreadable on bright terminal themes, due to hardcoded pastel colors.

Let's take a look at my terminal:
image
image

Code printed by the REPL is not legible.

I see two solutions to this problem:

  1. Use 16 standard ANSI colors according to their names and assume the user configure terminal to make colors legible in both dark and light mode.
    image
  2. Use 24 bit color. Allow the users to configure color theme by specifying token type - color mappings (example: Constant = #ff0000). This can be achieved via configuration file, xresources, env variable (like LS_COLORS) etc. This method should also assume the user can change theme at any time. Perhaps \e]11;?\a escape code could be used to determine what theme to use?

#224 --no-color flag is only partial solution because I want colors while using light theme 😄


This problem does not affect the pad, code is legible in both light and dark theme.

image
image

I have switched to ANSI colors for everything except number literals, which in my testing seem legible with the orange color in light or dark mode.

Sorry, I forgot about the colored output

Weird, the output colors look fine for me in both light and dark mode.
image
image

I compiled main right now and it fixes the code colors 👍️
image

Literals are not readable. Tested on wezterm, alacritty and contour.
image

This is how ansi --color-codes output looks like for me:
image

This may be fixed in 9796237.
While I see no difference in my environment, please let me know the results on yours.

obraz
obraz

Colors are quite subtle, but it fixes the issue. Thanks!