How to quickly generate a QR Code with transparent background

For an upcoming presentation I wanted to quickly generate a QR Code of my web site’s URL to include on the final slide. Since my slide theme has a green gradient background with white text, I wanted the QR Code to be white on a transparent background, as a PNG. Enter node-qrcode which runs easily via npx1: npx qrcode -o output.png -d FFFF -l 0000 -w 500 "https://foosel.net" -o output.png sets the output file -d FFFF sets the dark color (usually black) to white with 100% opacity -l 0000 sets the light color (usually white) to black with 0% opacity - fully transparent -w 500 sets the size to 500px For further options like error correction or QR code version, or how to use it as a library or in the browser, see node-qrcode’s repo linked above....

February 6, 2023 · 1 min
Mastodon