qrcodejs icon indicating copy to clipboard operation
qrcodejs copied to clipboard

Codes not readable

Open Yugloocamai opened this issue 6 years ago • 3 comments

Any and all QR codes I generate with this library are not parseable by any QR scanners that I have. The included example does not work, as well as my own urls and text snippets. Other libraries work fine for me. I suspect something broke in master recently.

Yugloocamai avatar Apr 23 '19 20:04 Yugloocamai

I had a similar issue, turned out the issue was using the code on a dark background. If you want to use the code on a dark background, you have to invert the colors: var qrcode = new QRCode(document.getElementById("qrcode"), { colorDark: "#fff", colorLight: "#000", });

moritzmorgenroth avatar May 06 '19 10:05 moritzmorgenroth

I had a similar issue, turned out the issue was using the code on a dark background. If you want to use the code on a dark background, you have to invert the colors: var qrcode = new QRCode(document.getElementById("qrcode"), { colorDark: "#fff", colorLight: "#000", });

Inverting the colors didn't work for me for some reason, but adding a white background did so thank you!

crowleysoftware avatar Apr 24 '21 15:04 crowleysoftware

I had a similar issue, turned out the issue was using the code on a dark background. If you want to use the code on a dark background, you have to invert the colors: var qrcode = new QRCode(document.getElementById("qrcode"), { colorDark: "#fff", colorLight: "#000", });

Amazed that this worked! Had no idea. Should be in the readme, what with how popular dark theme is 'these days'. Thanks.

rocket-pig avatar Sep 07 '23 01:09 rocket-pig