QR Code Styling
Atomix QRGen uses theqr-code-styling library to generate customizable QR codes. Currently, the application provides a default styling configuration optimized for readability and scannability.
Default Configuration
The QR codes are generated with the following settings:src/components/qr-code-app/cards/qr-preview/card-qr-preview.tsx:27-33
Current Features
Size
Fixed at 280x280 pixels for optimal scanning
Dot Style
Rounded dots for a modern, friendly appearance
Colors
Black dots on white background for maximum contrast
Error Correction
Level M (15%) for balance between size and reliability
Available Customization Options
Theqr-code-styling library supports extensive customization. Here are the options that could be implemented:
Dot Patterns
Dot Patterns
The library supports multiple dot styles:
rounded(current default)dotsclassyclassy-roundedsquareextra-rounded
Different dot patterns can affect scanability. Always test QR codes after changing the pattern.
Colors
Colors
You can customize:
- Dot color - Currently
#000(black) - Background color - Currently
#ffffff(white) - Gradient colors - For advanced styling
Corner Squares
Corner Squares
Customize the three corner squares (position detection patterns):
Corner Dots
Corner Dots
Style the dots inside corner squares:
Logo/Image
Logo/Image
Add a logo to the center of your QR code:
Error Correction Levels
The application currently uses error correction Level M (15%), visible in the preview card:src/components/qr-code-app/cards/qr-preview/card-qr-preview.tsx:330-332
Error correction levels determine how much of the QR code can be damaged while still being readable:
- L (Low): 7% recovery
- M (Medium): 15% recovery (current)
- Q (Quartile): 25% recovery
- H (High): 30% recovery
Future Customization
To implement custom styling in your fork of Atomix QRGen, you would modify theQRCodeStyling initialization in card-qr-preview.tsx:
Add UI controls
Create color pickers and style selectors in the preview card UI to allow users to customize their QR codes in real-time.
Best Practices
Test Scanability
Always test your QR codes with multiple scanning apps and devices before using them in production.
Maintain Contrast
Ensure at least a 3:1 contrast ratio between dots and background for reliable scanning.
Consider Context
Choose colors and styles appropriate for where the QR code will be displayed (print, screen, etc.).
Keep It Simple
Simpler designs scan more reliably. Avoid overly complex customizations for critical use cases.