Module Style
The module style controls the shape of every small data block that makes up the body of the QR code. Pass a style string (or theStyle enum) to style().
Square modules (default)
Circular dot modules
Rounded modules
Eye Style
The three large positional squares in the corners of every QR code are called eyes. Useeye() to set their outer shape.
Square eyes (default)
Circle eyes
Pointy eyes
Internal (Composite) Eye Style
Each positional eye is made of two parts: an outer frame and an inner marker. By default both share the same style set byeye(). Call internalEye() to style the inner marker independently, giving you composite eyes.
internalEye() accepts the same values as eye(): 'square', 'circle',
and 'pointy'.Square outer with circle inner
Circle outer with pointy inner
Size and Margin
Control the pixel dimensions and quiet zone around the code withsize() and margin().
size(int $size)— Total width and height in pixels. Default:400.margin(int $margin)— Quiet-zone thickness in modules. Default:4.
Margin 0 (no quiet zone)
Margin 2 (compact quiet zone)
Margin 6 (wide quiet zone)
Output Format
Useformat() to choose the image format of the generated QR code.
Encoding
By default the package encodes text as UTF-8, which handles the vast majority of use cases. Override this withencoding() when your payload uses a different character set.
Putting It All Together
Chain any combination of style options before callinggenerate().
Colors
Apply RGB, CMYK, grayscale, gradients, and per-eye color overrides.
Image Merge
Embed a logo or image into the center of your QR code.