Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 744 Bytes

index.md

File metadata and controls

33 lines (26 loc) · 744 Bytes

Resulting QR Code image

Code

let shadow = QRCode.Shadow(
   .dropShadow,
   dx: 0.2,
   dy: -0.2,
   blur: 2,
   color: CGColor.sRGBA(0, 0, 0, 0.25)
)

let svgData = try QRCode.build
   .text("https://www.deltakit.net/product/16x2-lcd-module-green/")
   .errorCorrection(.quantize)
   .backgroundColor(hexString: "#77CE07")
   .background.cornerRadius(2)
   .shadow(shadow)
   .eye.shape(QRCode.EyeShape.Squircle())

   .onPixels.foregroundColor(hexString: "#074302")
   .onPixels.shape(QRCode.PixelShape.Grid2x2())

   .offPixels.foregroundColor(CGColor(gray: 0, alpha: 0.15))
   .offPixels.shape(QRCode.PixelShape.Grid2x2())

   .generate.svg(dimension: 800)