Kill the Clipboard - SMART Health Cards Library - v0.0.1
    Preparing search index...

    Interface QREncodeParams

    Additional QR encoding parameters that can be passed to the qrcode library. This interface matches the expected qrcode library params.

    interface QREncodeParams {
        color?: { dark?: string; light?: string };
        errorCorrectionLevel?: "Q" | "L" | "M" | "H";
        margin?: number;
        maskPattern?: 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7;
        scale?: number;
        version?: number;
        width?: number;
    }
    Index

    Properties

    color?: { dark?: string; light?: string }

    Color configuration for QR code modules.

    Type declaration

    • Optionaldark?: string

      Color of dark modules in hex RGBA format (e.g., '#000000ff' for black).

      '#000000ff'

    • Optionallight?: string

      Color of light modules in hex RGBA format (e.g., '#ffffffff' for white).

      '#ffffffff'

    errorCorrectionLevel?: "Q" | "L" | "M" | "H"

    Error correction level per SMART Health Cards specification:

    • L (Low): ~7% error resistance, 1195 max characters (V22)
    • M (Medium): ~15% error resistance, 927 max characters (V22)
    • Q (Quartile): ~25% error resistance, 670 max characters (V22)
    • H (High): ~30% error resistance, 519 max characters (V22)

    'L'

    margin?: number

    Quiet zone size (border) around the QR code in modules.

    1

    maskPattern?: 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7

    Mask pattern used to mask the QR code symbol. Auto-selected by default for optimal readability.

    Range: 0-7

    scale?: number

    Scale factor for output image. A value of 1 means 1 pixel per module.

    4

    version?: number

    QR code version determining symbol size. Version 1 is 21x21 modules, Version 2 is 25x25, etc. Auto-selected by default based on data size.

    Range: 1-40

    width?: number

    Forces specific width for output image in pixels. Takes precedence over scale if specified.