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

implemented a 4-bit ANSI background color cycler for every new instance of a progress bar. Also uses the old gray colors for reference #1983

Closed
wants to merge 5 commits into from

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Jun 20, 2024

@DavyLandman @PaulKlint this is not for merging; but for trying out all the different colors in the ANSI 4-bit pallette as possible backgrounds. Notice that the names of the colors are not necessarily what people implement in their terminals.

For example, this is what wikipedia reports on different interpretations already: https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit:~:text=The%20chart%20below%20shows%20a%20few%20examples%20of%20how%20VGA%20standard%20and%20modern%20terminal%20emulators%20translate%20the%204%2Dbit%20color%20codes%20into%2024%2Dbit%20color%20codes.

Let's collect some screenshots here.

…ce of a progress bar. Also uses the old gray colors for reference
@jurgenvinju
Copy link
Member Author

jurgenvinju commented Jun 20, 2024

This is Solarized in Terminal.app:

image

You see how they avoid the color yellow because that is the common background color (lightyellow-ish). Still that color name contrasts well with the foreground color.

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 49%. Comparing base (f656c0a) to head (7afd2c5).
Report is 1 commits behind head on main.

Files Patch % Lines
...org/rascalmpl/repl/TerminalProgressBarMonitor.java 0% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #1983   +/-   ##
=======================================
- Coverage       49%     49%   -1%     
+ Complexity    6291    6285    -6     
=======================================
  Files          664     664           
  Lines        59548   59547    -1     
  Branches      8637    8638    +1     
=======================================
- Hits         29420   29405   -15     
- Misses       27913   27927   +14     
  Partials      2215    2215           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jurgenvinju
Copy link
Member Author

This is "Pro" in Terminal.App:

image

@jurgenvinju
Copy link
Member Author

jurgenvinju commented Jun 20, 2024

This is Solarized in the VScode Xterm.js view:

image

I think they did a better job here for all the 4-bit colors. But the big difference is that the foreground color is set to black, while in Terminal.app it is quite a different color.

:::tip
this one is pretty amazing because for one background color, suddenly the foreground color switches as well. This is not out code, but an effect of the theme
:::

@jurgenvinju
Copy link
Member Author

jurgenvinju commented Jun 20, 2024

Dark theme in VScode:

image

:::tip
Here again, for grey10 the foreground color swaps!
:::

@jurgenvinju
Copy link
Member Author

I think we have to force the foreground to black...

@jurgenvinju
Copy link
Member Author

jurgenvinju commented Jun 20, 2024

This is Dark mode in Terminal.app with foreground programmatically set to "Black"; apparantly the theme does not map this to white?

image

:::tip
Here Grey10 does not swap the foreground to white as with the above examples
:::

@jurgenvinju
Copy link
Member Author

jurgenvinju commented Jun 20, 2024

This is Solarized in Terminal.app with foreground set to black:

image

Again Grey10 does not force a foreground swap as it does in VScode.

@DavyLandman
Copy link
Member

DavyLandman commented Jun 21, 2024

Windows Terminal (the new one, with solarized dark theme):
image

Windows Console (the old one, not themeable):
image

@jurgenvinju
Copy link
Member Author

Solarized Terminal.app with forced white foreground:

image

@jurgenvinju
Copy link
Member Author

image

windows terminal met solarized light:

@jurgenvinju
Copy link
Member Author

image

old windows terminal (no theming)

@jurgenvinju
Copy link
Member Author

image

windows solarized dark

jurgenvinju added a commit that referenced this pull request Jun 22, 2024
…ith bright white foreground inside the bar and normal text outside the bar; also dropped all the underline and overline fringes for better consistency acros themes. works well with both dark and white themes now, due to the forced bright white foreground and they middle gray which has best contrast if you need to optimize for both dark and light backgrounds at the same time
@jurgenvinju
Copy link
Member Author

Archiving this PR for later reference. Was not meant to be merged.

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

Successfully merging this pull request may close these issues.

2 participants