I have been working on extending my transparent widget script to support blurred translucent backgrounds, just like the Batteries widget. This was much more difficult than I had anticipated, since the built-in DrawContext doesn’t support blurring or blending modes.
In my case, I used the amazing StackBlur algorithm and some additional algebra to create translucent widget backgrounds. Here is the script to create these backgrounds. Enjoy!
I have another approach where you set a background image like what you did on the transparent widget script and then add a semi-transparent linear gradient. Works just as well so I added it to my no-background module.
Nice! The semi-transparent gradient is definitely more straightforward, and the result looks nice. The only reason my code is so convoluted is because I was trying to match the Batteries widget exactly - to do that, you need to mess with the colors a bit further.
Yes, The blur provides a better effect than just plain alpha.