Function: assertQrCodePaint()
function assertQrCodePaint(
moduleColor: string,
backgroundColor: string,
minContrastRatio: number
): void;Defined in: shared/qr-code/svg.ts:92
Enforce the three paint invariants a scannable symbol depends on:
- Both paints resolve to a concrete sRGB value, so contrast is checkable.
- Both are fully opaque — see-through paint composites the host surface into the symbol.
- They are far enough apart for a scanner's thresholding pass to work.
Shared by renderQrCodeMatrixSvg and the UDS QRCode component so the
two rendering surfaces cannot drift on the guarantee.
Parameters
| Parameter | Type |
|---|---|
moduleColor | string |
backgroundColor | string |
minContrastRatio | number |
Returns
void