-
Notifications
You must be signed in to change notification settings - Fork 1
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
Suggestion: Support transparency #5
Comments
Currently working on supporting proper alpha blending. WIP example here: https://imgur.com/a/VW44aNz Alas, sometimes the kingdom is lost for want of a nail. In order to do proper blending I have to know the current background colour of the terminal. Powershell itself will report the console colour, but the actual colour is only know to the terminal application. It should be retrievable with ANSI escape codes, but the relevant ones are not implemented in the Windows console yet (microsoft/terminal#3718). Going to mull over this for a little longer. |
I think I also looked into this a year ago and gave up very quickly 😆 I suppose at worst, if blending is enabled via a parameter, you could force the user to also provide the known background color as a parameter, but that might be too clunky. Interested to see what you come up with! |
I've done exactly that in the current "positioning" branch. Can force a transparency color by parameter, or it will just default to my console background right now (works on my machine!). This is the One Half Dark theme from Windows Terminal, so it will work for at least a tiny amount of other people too without setting anything! It is basically a placeholder while I try to figure out some way to get the terminal background color. Not too hopeful on that right now. It will automatically detect if blending is relevant, and only apply it where useful, so there is no parameter on whether to activate it or not. |
Merged, and released on the gallery as v.1.6. I'll watch for Terminal getting update with proper support for retrieving bg colour via OSC calls. |
Just a suggestion: if the imported image has a pixel with any amount of transparency, it'd be cool if that pixel translated to an empty character or space when being output to the console - this would allow small icons or pngs with a transparent background to render without a black box around them.
The text was updated successfully, but these errors were encountered: