Skip to content

Conversation

@Stebalien
Copy link
Contributor

This heuristic will make a background transparent as long as that background color appears in all 4 corners. It's a heuristic so it won't always produce correct results, but, IMO, it's better than nothing.

This heuristic will make a background transparent as long as that
background color appears in all 4 corners. It's a heuristic so it won't
always produce correct results, but, IMO, it's better than nothing.
@Stebalien
Copy link
Contributor Author

Also, FYI, I implemented an ARGB to XPM converter in EXWM if you want to try stealing that code instead:

https://github.com/emacs-exwm/exwm/blob/d1be727e1e96621478a209b48f7cf293a8fb4344/exwm.el#L440-L513

Unlike PBM, XPM has transparency support (although it doesn't have "true" alpha channel support).

@sinic
Copy link
Owner

sinic commented Nov 4, 2025

Thanks again!

I'll go with the heuristic, I prefer keeping my codebase small.

@sinic sinic merged commit 638d73e into sinic:master Nov 4, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants