I have created an npm module based on this code. You can get everything needed info about that [here](https://github.com/atassis/smokybg)