-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Handling transparent BG color when used as FG #1898
Comments
I think it could work if alpha is forced to 1 when using background color as inverted foreground color. |
Or do you want a new I can make a PR |
I think having an |
In the interest of keeping the API simpler/slimmer I think this option would work fine, unless there's a real case where an alpha of 1 doesn't make sense (we already force alpha 1 on cells with background when background transparency is on). |
@Tyriar if you mean forcing the alpha component of |
@chabou What is the status of this? How can we help? This issue is blocker for me! |
@sukima we're just waiting on a PR for this if you want to work on it. The proposal above is to when the bg color is used as the fg then always force alpha to be 1 (opaque). This will need to be handled in both canvas and dom renderers: |
@Tyriar here's my attempt at this for the WebGL renderer: Eugeny@cf48304 However, even though the color logic is fine, it leads to the reverse text looking "chipped" - see here: |
This needs to be done for both renderers - I just started with the webgl one for no specific reason. |
We need to translate xterm.js/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts Lines 231 to 236 in 8b5c48f
|
Hey guys, is there anything I could do to help you fix this in the WebGL renderer as well? |
@Tyriar |
@jerch the idea is not to make inverted FG transparent, but rather ignore the alpha part of BG: #1898 (comment) |
Could anyone who knows his way around the renderer take a second look at this? It's pretty much prevents widespread adoption of the webgl renderer. |
Hi, Any update on this, webgl still has the issue. |
@Eugeny I think this should be relatively easy to fix if you want to give it a try: #1898 (comment) Basically something like:
|
@Tyriar the color was already When When When Note how higher values make the text less "deep fried". |
Nano displays its shortcuts with FG/BG colors reversed:
However, when theme BG is
transparent
, following happens:The solution could be to have a separate flag that will render characters with no background as if background were transparent instead of
theme.backgroundColor
, but will still use the actual color for inverted elements.The text was updated successfully, but these errors were encountered: