Colors

BarcodeThis allows you to specify a background color with the bg_color parameter and a foreground color with the fg_color parameter.

Parameter Values

Hex code Any hex color code (you must replace # with %23)
Color name Any of the supported color names.

To pass a hex color as a query string argument, you must specify the # character as %23. An error will occur if you pass # as part of the hex color. For example, to specify the color white you would pass it as %23fff.

Example 1

Generate a barcode with custom background and foreground colors:

        
            https://barcodethis.io/api/v1?value=https://barcodethis.io&type=QRCODE&bg_color=%2300a4a7&fg_color=%23fff&api_token=[TOKEN]
        
    
QR Code color example

Example 2

Generate a barcode with named colors:

        
            https://barcodethis.io/api/v1?value=Example&type=C39&bg_color=oldlace&fg_color=lightcoral&show_label=0&api_token=[TOKEN]
        
    
Barcode example with named colors

Supported Color Names

The following color names can be used as parameter values for bg_color or fg_color.

aliceblue
antiquewhite
aqua
aquamarine
azure
beige
bisque
black
blanchedalmond
blue
blueviolet
brown
burlywood
cadetblue
chartreuse
chocolate
coral
cornflowerblue
cornsilk
crimson
cyan
darkblue
darkcyan
darkgoldenrod
dkgray
darkgray
darkgrey
darkgreen
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkslateblue
darkslategray
darkslategrey
darkturquoise
darkviolet
deeppink
deepskyblue
dimgray
dimgrey
dodgerblue
firebrick
floralwhite
forestgreen
fuchsia
gainsboro
ghostwhite
gold
goldenrod
gray
grey
green
greenyellow
honeydew
hotpink
indianred
indigo
ivory
khaki
lavender
lavenderblush
lawngreen
lemonchiffon
lightblue
lightcoral
lightcyan
lightgoldenrodyellow
ltgray
lightgray
lightgrey
lightgreen
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslategray
lightslategrey
lightsteelblue
lightyellow
lime
limegreen
linen
magenta
maroon
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
moccasin
navajowhite
navy
oldlace
olive
olivedrab
orange
orangered
orchid
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
peachpuff
peru
pink
plum
powderblue
purple
red
rosybrown
royalblue
saddlebrown
salmon
sandybrown
seagreen
seashell
sienna
silver
skyblue
slateblue
slategray
slategrey
snow
springgreen
steelblue
tan
teal
thistle
tomato
turquoise
violet
wheat
white
whitesmoke
yellow
yellowgreen