Barcode Generator Settings JSON format
This document describes the JSON format understood by the sc_barcode_generator_set_options() function.
1D Symbologies
foregroundColor:
4-tuple of integers [r, g, b, a] withr
,g
,b
anda
being in the range [0, 255]backgroundColor:
4-tuple of integers [r, g, b, a] withr
,g
,b
anda
being in the range [0, 255]
2D Symbologies
General options
foregroundColor:
4-tuple of integers [r, g, b, a] withr
,g
,b
anda
being in the range [0, 255]backgroundColor:
4-tuple of integers [r, g, b, a] withr
,g
,b
anda
being in the range [0, 255]
QR
errorCorrectionLevel:
string, may be"L"
(up to 7% damage),"M"
(up to 15% damage),"Q"
(up to 25% damage) or"H"
(up to 30% damage). Default correction level is"M"
.versionNumber:
positive integer, overrides desired version number. Version number is automatically chosen if not set. Barcode generation might fail if version number is too small.- Example barcode generator settings for QR code:
{
"foregroundColor" : [ 255, 0, 0, 255 ],
"backgroundColor" : [ 0, 0, 255, 255 ],
"errorCorrectionLevel": "Q"
}