Module Colors¶
By default the QR codes are rendered in black and white but this project supports individual colors for each QR Code module type, i.e. the alignment and finder patterns may use another color than the data modules.
The color values can be provided as tuple (R, G, B)
, as web color name
(like ‘red’) or as hexadecimal #RRGGBB
value (i.e. ‘#085A75’).
The value None
is used to indicate transparency, i.e. light_color=None
indicates that all light modules should be transparent.
Module names¶
The following examples show the results of all supported module types. The unaffected modules are rendered as grey or white modules, the red modules show the result of the keyword.
dark_color¶
Sets the (default) color of dark modules.
light_color¶
Sets the (default) color of light modules.
alignment_dark_color¶
Sets the color of the dark alignment pattern modules.
Micro QR Codes don’t have alignment patterns.
alignment_light_color¶
Sets the color of the light alignment pattern modules.
Micro QR Codes don’t have alignment patterns.
data_dark_color¶
Sets the color of the dark data modules.
data_light_color¶
Sets the color of the light data modules.
finder_dark_color¶
Sets the color of the dark modules of the finder pattern.
finder_light_color¶
Sets the color of the light modules of the finder pattern.
format_dark_color¶
Sets the color of the dark modules of the format information.
format_light_color¶
Sets the color of the light modules of the format information.
quiet_zone_color¶
Sets the color of the quiet zone.
separator_color¶
Sets the color of the separator.
timing_dark_color¶
Sets the color of the dark modules of the timing pattern.
timing_light_color¶
Sets the color of the light modules of the timing pattern.
version_dark_color¶
Sets the color of the dark modules of the version information.
Micro QR Codes and QR Codes lesser than version 7 don’t carry any version information.
version_light_color¶
Sets the color of the light modules of the version information.
Micro QR Codes and QR Codes lesser than version 7 don’t carry any version information.