vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.28k stars 3.52k forks source link

Unreadable nano labels if backgroundColor is transparent #2984

Open lordgiotto opened 6 years ago

lordgiotto commented 6 years ago

Issue

There are a lot of similar opened issues, but all miss the steps to reproduce the bug. I noticed that it depends on backgroundColor setting.

Nano labels are not readable if backgroundColor setting is an rgba color with opacity different from 1.

Thanks for your great work btw :)

backgroundColor: 'rgba(0, 0, 0, .9)', backgroundColor: 'rgba(0, 0, 0, .9)',


backgroundColor: 'rgba(0, 0, 0, 1)', backgroundColor: 'rgba(0, 0, 0, 1)',

nerrad commented 6 years ago

ya happening for me too. The hyper-star-wars theme sets background color to transparent which is how it surfaced for me.

sukima commented 5 years ago
screen shot 2019-01-27 at 7 57 59 am

Confirmed this happens in other apps as well like nnn.

sukima commented 5 years ago

Unfortunately if you want a background image you are forced to have a transparent backgroundColor which then introduces this bug.

My guess is that when the terminal receives the reverse escape code the renderer will use the backgroundColor for the text color. But since it is transparent it doesn't show. Unfortunately by setting an opaque backgroundColor the terminal will write that color to the canvas and cover any background set in the CSS.

Since the terminal will only handle a color not a url() there is no way to have a background image without transparent and introducing this bug.

Now if only there was a setting so that reverse colors can use an opaque color while the normal text background could use the transparent background that would be great.

chabou commented 5 years ago

@sukima yes, this is exactly what happens. This must be fixed directly in xterm.js

chabou commented 5 years ago

Related xterm issue: https://github.com/xtermjs/xterm.js/issues/1898