You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transparent background doesn't become transparent foreground when rendered in reverse video #7014
The new Preview 1.2.2022.0 seems to fix all the VT colors issues I observed before, except one last case:
When the background color is the default (49), it is correctly kept transparent, but if the foreground color is transparent, which is possible when the background is 49 and then the colors are reversed using 7, it is rendered as black instead of transparent.
In both cases, there should be no black square, the acrylic transparency should show through instead.
Reacted by Luan Vitor Simião Oliveira, Thanh Phan, Dmitry Kuznetsov, Amirreza Askarpour, Wildan F. Abdillah, Homa Wong, Paulus Pärssinen, Ananto Ghosh, Richard Sutherland, Liangru Liu and 5 more
Could we get that behavior through an optional flag ?
I understand your performance goal, but for some ANSI-art effects, the only solution is to use an existing character reversed, such as for the 3-cells square above. Would be nice to be able to turn it on for specific profiles.
Meh, I'd be inclined to implement it and not make it configurable -- it's more expensive on the engineering side than it is on the runtime side, I expect. 😄
Especially since you can use it only when you have that specific attributes combination, the current code can be used for faster rendering in every other case, and that combination would definitely look more correct taking advantage of the acrylic effect.
changed the title [-]One last VT color issue in 1.2 - transparent foreground (default background while reversed)[/-][+]Transparent background doesn't become transparent foreground when rendered in reverse video[/+]on Jul 23, 2020
We can't use a geometry mask based on the glyph run, because we want to fill outside of the geometry and not touch inside the geometry[1].
We may need to use an alpha bitmap (1bpp black and white, converted to an alpha mask) like we did in Islandwood's CGImage and push a layer whose opacity bitmap is this guy.
[1]: Nevermind, I just saw ID2D1Geometry::CombineWithGeometry; perhaps we can just create a Rectangle geometry, combine EXCLUDE the glyph geometries, and fill that...
There is info about fix this bug in 1.15.18620 changelog:
We no longer suppress black blackground or gray foreground for PowerShell (#13352)
We have chosen to remove this workaround as newer versions of PowerShell's PSReadline component contain a fix for the issue.
This was a compatibility band-aid that was impacting the capabilities of great projects such as Oh My Posh.
❗ If you see unexpected black backgrounds appearing behind text while typing a command in PowerShell, make sure your PSReadline version is up to date. You can update your version of PSReadline by running the command, Update-Module PSReadline.
I have installed PSReadline 2.2.6 by Install-Module -Name PSReadline -Force for PS 7.2.5. But for me the issue is still reproduces on the latest 1.15.18620.
Thanks for the report! Yes, this is not machine-specific and requires explicit work in the renderer. We recently put a lot of effort into the new rendering engine, and we think that it should be possible to do this properly.
Yep. We'll make sure to update this thread when there are updates. If someone's interested in trying to fix this themselves, we'd be more than happy to point in the right direction!
Reacted by Gabriel Bider, Wladislav Artsimovich, Valerio Ceccarelli, 7mile, Paul Moore and makampf
FYI, there is an inverse variant of the arrow head glyphs that was added to nerd fonts a couple of years ago, which provides a way to work around this transparency problem. For more info, see #18266 (comment).
which provides a way to work around this transparency problem
It doesn't work in all situations, and even when it does, it requires extra complication in your setup to use the additional characters. So getting this issue fixed would still be worthwhile.
which provides a way to work around this transparency problem
It doesn't work in all situations, and even when it does, it requires extra complication in your setup to use the additional characters. So getting this issue fixed would still be worthwhile.
yea it doesnt work most of the time. it works fine in powershell but vscode doesnt like it and makes a gap
Does VS Code have a different rendering engine? It might be necessary to raise a separate issue with them - I honestly don't know 🙁 It would be nice if the problem could be solved in a single place, but I don't know if that's the reality here.
Activity
DHowett commentedon Jul 22, 2020
Oh yeah, we need to do an inverse alpha mask with the shaped text. It's expensive and something we chose to not to.
PhMajerus commentedon Jul 22, 2020
Could we get that behavior through an optional flag ?
I understand your performance goal, but for some ANSI-art effects, the only solution is to use an existing character reversed, such as for the 3-cells square above. Would be nice to be able to turn it on for specific profiles.
DHowett commentedon Jul 22, 2020
Meh, I'd be inclined to implement it and not make it configurable -- it's more expensive on the engineering side than it is on the runtime side, I expect. 😄
PhMajerus commentedon Jul 22, 2020
Dustin L. Howett (@DHowett) 👍 Great, can't wait to see it implemented then 😁
Especially since you can use it only when you have that specific attributes combination, the current code can be used for faster rendering in every other case, and that combination would definitely look more correct taking advantage of the acrylic effect.
[-]One last VT color issue in 1.2 - transparent foreground (default background while reversed)[/-][+]Transparent background doesn't become transparent foreground when rendered in reverse video[/+]DHowett commentedon Jul 23, 2020
Notes:
We can't use a geometry mask based on the glyph run, because we want to fill outside of the geometry and not touch inside the geometry[1].
We may need to use an alpha bitmap (1bpp black and white, converted to an alpha mask) like we did in Islandwood's CGImage and push a layer whose opacity bitmap is this guy.
[1]: Nevermind, I just saw ID2D1Geometry::CombineWithGeometry; perhaps we can just create a Rectangle geometry, combine EXCLUDE the glyph geometries, and fill that...
16 remaining items
carpet92 commentedon Jul 21, 2022
Dustin L. Howett (@DHowett)
There is info about fix this bug in 1.15.18620 changelog:
I have installed PSReadline 2.2.6 by
Install-Module -Name PSReadline -Forcefor PS 7.2.5. But for me the issue is still reproduces on the latest 1.15.18620.Related discussion: JanDeDobbeleer/oh-my-posh#2555
How to fix the issue as it done in this comment?: #7014 (comment)
zeratax commentedon Mar 14, 2023
I can still reproduce this as well on 1.17.1023
DHowett commentedon Mar 14, 2023
Thanks for the report! That would be because it has not yet been fixed.
FrostKiwi commentedon Jul 14, 2023
Want to confirm it being broken on my machine as well with

ver 1.17.11461.0, as reported in #15491 and #15491DHowett commentedon Jul 14, 2023
Thanks for the report! Yes, this is not machine-specific and requires explicit work in the renderer. We recently put a lot of effort into the new rendering engine, and we think that it should be possible to do this properly.
silkfire commentedon Dec 10, 2023
What's the status on this? Still present in 1.18.3181.0
zadjii-msft commentedon Dec 11, 2023
Yep. We'll make sure to update this thread when there are updates. If someone's interested in trying to fix this themselves, we'd be more than happy to point in the right direction!
Spillium commentedon Apr 28, 2026
is this still being worked on?? having this issue aswell
j4james commentedon Apr 28, 2026
FYI, there is an inverse variant of the arrow head glyphs that was added to nerd fonts a couple of years ago, which provides a way to work around this transparency problem. For more info, see #18266 (comment).
pfmoore commentedon Apr 28, 2026
It doesn't work in all situations, and even when it does, it requires extra complication in your setup to use the additional characters. So getting this issue fixed would still be worthwhile.
Spillium commentedon Apr 28, 2026
yea it doesnt work most of the time. it works fine in powershell but vscode doesnt like it and makes a gap
pfmoore commentedon Apr 28, 2026
Does VS Code have a different rendering engine? It might be necessary to raise a separate issue with them - I honestly don't know 🙁 It would be nice if the problem could be solved in a single place, but I don't know if that's the reality here.
lhecker commentedon Apr 28, 2026
Indeed, VS Code has its own terminal implementation called
xterm.js.