Generating Custom Vector QR Codes
Standard black-and-white QR codes break brand aesthetics and degrade when printed on textured packaging. This guide customizes matrix dot geometry, embeds company logos, and exports print-ready vector SVG and high-resolution PNG QR codes backed by level H error correction.
Prerequisites
- Workspace permissions:
Owner,Admin, orMemberrole in your Shaf organization. - An existing short link created in your workspace.
- A square brand logo (SVG or PNG with transparent background) for center embedding.
Implementation Recipe
Open QR Code Studio
In the Shaf Dashboard, navigate to Links, locate your short link, and click the QR Code action button (⊞). Alternatively, fetch a styled code via the QR generation API (see Tools API Reference):
curl -X GET "https://shaf.app/api/v1/tools/qr?linkId=lnk_01j8k9m4&format=svg&dots=rounded&color=%231e293b" \ -H "Authorization: Bearer $SHAF_API_TOKEN" \ -o "branded-qr.svg"Configure Matrix Geometry and Colors
Customize styling parameters in the interactive editor:
Select matrix patterns based on your publication medium:
Style Characteristics Recommended Usage SquareSharp, classic edges Maximum scanner compatibility on low-resolution cameras. Rounded25% corner radius on matrix dots Modern consumer marketing and digital displays. DotsFully circular module circles Event badges, retail merchandise, and lifestyle media. Extra-RoundedPill-shaped adjacent modules Luxury packaging and architectural signage. - Foreground Color: Choose a dark brand hex code (e.g.,
#0f172a). Ensure at least a 3:1 contrast ratio against the background. - Background Color: Solid white (
#ffffff) or toggle Transparent for overlaying onto colored marketing collateral.
Upload your square brand logo:
- Shaf centers the logo with automatic white boundary margin padding.
- Error correction is locked to Level H (High), providing 30% Reed-Solomon data recovery so the logo never impedes camera scan speed.
- Foreground Color: Choose a dark brand hex code (e.g.,
Export Vector & Raster Assets
Download the finalized asset based on your publication channel:
- SVG (Scalable Vector Graphics): Infinite scaling with zero pixelation for physical packaging, business cards, and billboards.
- PNG (High Resolution 1024x1024 or 2048x2048): Optimized for emails, social media graphics, and web presentations.
Verification
Validate scannability using a smartphone camera or the zbarimg command-line scanner:
zbarimg branded-qr.pngExpected output:
QR-Code:https://shaf.is/summer-deal
scanned 1 barcode symbols from 1 images in 0.04 secondsCommon Gotchas
| Issue / Error | Root Cause | Solution |
|---|---|---|
| Camera cannot detect QR code | Contrast ratio between dots and background is less than 3:1. | Use a high-contrast palette (dark dots on light background). |
| Camera reads broken payload | Center logo exceeds 30% of total QR area, corrupting data modules. | Reduce logo dimensions so it covers no more than 20–25% of the central canvas. |
| Pixelated printing on packaging | Bitmap PNG was enlarged for physical offset printing. | Export vector SVG format for all physical print production. |
| Inverted colors scan failure | Light dots on dark background scanned by older device cameras. | Keep foreground darker than background for mission-critical print runs. |