-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat(patches/alpha-background): add experimental alpha-background patch #129
Conversation
@jonrubens I hope you don't mind if I borrow the changes in your The patch feature includes a static If you don't mind others making use of your alpha-background changes, I think it'd be nice to get a patch submitted to emacs-plus as well. They already maintain a number of very nice patches. |
You can absolutely include my change as a patch. FYI, I have submitted the code to the Emacs master branch, so hopefully it will get pulled in for Emacs 31. |
@jonrubens Not sure if you've noticed, but when stepping through alpha-background with +1 or -1, I notice some odd flickering and color changes with my config. Essentially, every second or third value yields a slightly more yellowish background color than others, making it look like a slight flicker when quickly stepping up/down the alpha-background one value at a time. I'm not sure if it's simply how the math works out when applying transparency to the colors of my theme, or if it's some odd bug with If you're curious to dig deeper, I've got screenshots ranging with values 70 to 100 for both
I used my transparency helpers for quickly changing the value, and here's a variant that uses
|
I haven't ever noticed the color flicker. It's been a while since I wrote the code but my first pass guess is that it is something in how MacOS does transparency and not on the emacs side of things. I might dig into that further but I don't think there is anything in what I wrote that breaks down the color values to RGB besides simply applying the alpha component. It could be a consequence of how MacOS rounds when taking a 0-100 multiplier and converts to 0-255. As for the intensity curve, that is something that bothered me and it never felt right. I wanted the transparency at 90% alpha to match 90% alpha-background but I couldn't figure out why it doesn't. I had an idea to fix it by translating the alpha-background curve to match, but it felt to hacky when there must be some layer being drawn that should be able to be fixed. |
Resolves #111