Skip to content

Kirby 4.2.0

$qrcode->toSvg()

Returns the QR code as <svg> element

$qrcode->toSvg(string|int|null $size = null, string $color = '#000000', string $back = '#ffffff'): string

Parameters

Name Type Default Description
$size string|int|null null Optional CSS width of the <svg> element
$color string '#000000' Foreground color in hex format
$back string '#ffffff' Background color in hex format

Return type

string

Parent class

Kirby\Image\QrCode