Background-Color #121
-
Hello, is it possible to set a background color other than white as an option? Many greetings, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Hey, i think i should add a bit documentation what
|
Beta Was this translation helpful? Give feedback.
-
Hello, I have a background that is blue. When I generate the QR Code, the generated image overlays the blue background, leaving the white background and the code in black. How should I do so that the code is generated in white and with a transparent background? I'm using SVG. I tried the options below, but it still ignores it. Furthermore, this QR Code with the background image is saved in a PDF via PHP. Any ideas on how to resolve this? $options = new QROptions; |
Beta Was this translation helpful? Give feedback.
-
Very good, @codemasher! Thank you very much for your recommendation, it worked perfectly. The last question is what is the parameter for the QR code to be drawn in white? By default it is black, but as the background color is dark blue, I believe white would be better for reading the QR code. |
Beta Was this translation helpful? Give feedback.
Hey,
i think i should add a bit documentation what
QROptions::$imageTransparent
actually does.GdImage
mode (png, gif) it setsimagecolortransparent()
withQROptions::$imageTransparencyBG
. The part that's not documented is that$imageTransparencyBG
also sets the "normal" background color without transparency switch.