Background color (dark UI / email)
Transparent PNGs disappear on dark backgrounds. Pass a white (or light) $bgcolor:
| Transparent (default) | White background |
|---|---|
![]() |
![]() |
// Recommended for dark themes and email clients
DNS2D::getBarcodePNG($url, 'QRCODE', 6, 6, [0, 0, 0], [255, 255, 255]);
DNS1D::getBarcodePNG('WHITEBG', 'C128', 3, 70, [0, 0, 0], false, [255, 255, 255]);


