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

Bad background color on rxvt-unicode #9

Closed
garywill opened this issue Jan 7, 2019 · 14 comments · Fixed by #26
Closed

Bad background color on rxvt-unicode #9

garywill opened this issue Jan 7, 2019 · 14 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@garywill
Copy link

garywill commented Jan 7, 2019

Hi there,
Thank you for this tool.

There is a background color making it difficult to see the characters on rxvt-unicode only.

rxvt-unicode with default settings:
urxvt

maybe that looks not a big problem, but when I have dark terminal theme, that make it difficult to see:
urxvt-black

That background color not appear on other terminals, just rxvt-unicode.

@sharkdp
Copy link
Owner

sharkdp commented Jan 7, 2019

There shouldn't be any background colors in the output. It seems like your terminal emulator does not support truecolor ANSI color codes (24-bit) and is mistakenly displaying background colors.

@sharkdp
Copy link
Owner

sharkdp commented Jan 7, 2019

It should be fairly easy for hexyl to just use 8-bit ANSI codes. We should work on this.

@sharkdp sharkdp added the enhancement New feature or request label Jan 7, 2019
@kilobyte
Copy link

kilobyte commented Jan 7, 2019

Just checked: rxvt-unicode supports 30-37 (basic ANSI, plus optional bold=bright), 90-97 (aixterm bright), 38;5;0-255 (256-color) but not 38;2;0-255;0-255;0-255 (24-bit).

But then, you don't need any colors above the basic 16, so even 30-37 + 1 should be enough.

@sharkdp
Copy link
Owner

sharkdp commented Jan 8, 2019

Hm, yes. We could also go to a basic 16 color scheme, but that would require the user to have a decent color scheme in the terminal 😄

I think I'd go with interpolated 8-bit colors.

@kilobyte
Copy link

kilobyte commented Jan 9, 2019

The only remaining terminal I know that doesn't understand anything but 16 colors in Hurd console — but it's not like Hurd sees any real use. Anything else at least does something useful (like, Linux and FreeBSD text consoles gracefully degrade 256 to 16, for compatibility with legacy hardware limitations). I obviously exclude unmaintained software, and terminals I haven't looked at.

As for 24-bit, here's a nice table documenting support. TL;DR: the vast majority of maintained terminals support that in current versions, but in too many cases this support is recent. Thus, going with 8-bit sounds right. You can revisit the decision in several years from now.

@mooyoul
Copy link

mooyoul commented Jan 9, 2019

It would be great if hexyl supports 256 colors also 👍
I cannot get beautiful results from hexyl since i'm using Terminal.app (macOS built-in app) with tmux, which does not support 24bit true colors.

Please refer below screenshots:

Terminal.app without tmux

2019-01-10 7 42 52

Terminal.app with tmux

2019-01-10 7 43 10

@sharkdp
Copy link
Owner

sharkdp commented Jan 10, 2019

Fixed in v0.3.1.

@mooyoul
Copy link

mooyoul commented Jan 10, 2019

Awesome. how beautiful it is! ❤️
Kudos for your amazing work!

v0.3.1 in Terminal.app with tmux:

2019-01-10 5 39 35

@garywill
Copy link
Author

hmmmm.... color not right in rxvt-unicode, v0.3.1

image
my environment variables: (if it helps)

COLORTERM=rxvt-xpm
COLORFGBG=default;default
TERM=rxvt-unicode

@sharkdp
Copy link
Owner

sharkdp commented Jan 10, 2019

rxvt-unicode, v0.3.1

That can't be right. The current version (from 2016!) is v9.22. v0.3.1 doesn't even seem to be published.

Can you run basic ANSI color tests like this: https://gist.github.com/ketan/2866a236596636311d64 ?

@garywill
Copy link
Author

I mean hexyl 0.3.1. Sorry I wans't clear.

I found two rxvt binaries urxvt-256color and urxvt in system. I used urxvt. The 256 color one seems OK.

This is the urxvt test result:

image

image

@kilobyte
Copy link

Isn't that the ancient mainline branch of rxvt, with last upstream update in 2001 then a beta in 2003? It lingered until last year in Debian-based distributions. If so, then no wonders it's crap.

@sharkdp
Copy link
Owner

sharkdp commented Jan 13, 2019

@garywill I didn't quite understand if you managed to solve the issue or not. If you believe that there is something wrong with hexyl, please open a new ticket.

@garywill
Copy link
Author

solved by using the 256 color urxvt, sorry to bother

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

Successfully merging a pull request may close this issue.

4 participants