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.

Colorful 7-H QR code encoding "Yellow Submarine" Colorful M4-Q QR code encoding "RAIN"

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.

Picture showing the dark modules Picture showing the dark modules of a Micro QR code

light_color

Sets the (default) color of light modules.

Picture showing the light modules Picture showing the light modules of a Micro QR code

alignment_dark_color

Sets the color of the dark alignment pattern modules.

Micro QR Codes don’t have alignment patterns.

Picture showing the dark alignment modules Picture showing the dark alignment modules of a Micro QR code (none)

alignment_light_color

Sets the color of the light alignment pattern modules.

Micro QR Codes don’t have alignment patterns.

Picture showing the light alignment modules Picture showing the light alignment modules of a Micro QR code (none)

dark_module_color

Sets the color of the dark module.

Micro QR Codes don’t have a dark module.

Picture showing the dark modules Picture showing the dark modules of a Micro QR code (none)

data_dark_color

Sets the color of the dark data modules.

Picture showing the dark data modules Picture showing the dark data modules of a Micro QR code

data_light_color

Sets the color of the light data modules.

Picture showing the light modules Picture showing the light modules of a Micro QR code

finder_dark_color

Sets the color of the dark modules of the finder pattern.

Picture showing the dark finder modules Picture showing the dark finder modules of a Micro QR code

finder_light_color

Sets the color of the light modules of the finder pattern.

Picture showing the light finder modules Picture showing the light finder modules of a Micro QR code

format_dark_color

Sets the color of the dark modules of the format information.

Picture showing the dark format information modules Picture showing the dark format information modules of a Micro QR code (none)

format_light_color

Sets the color of the light modules of the format information.

Picture showing the light format information modules Picture showing the light format information modules of a Micro QR code (none)

quiet_zone_color

Sets the color of the quiet zone.

Picture showing the quiet zone Picture showing the quiet zone of a Micro QR code

separator_color

Sets the color of the separator.

Picture showing the separator Picture showing the separator of a Micro QR code

timing_dark_color

Sets the color of the dark modules of the timing pattern.

Picture showing the dark timing pattern modules Picture showing the dark timing pattern modules of a Micro QR code

timing_light_color

Sets the color of the light modules of the timing pattern.

Picture showing the light timing pattern modules Picture showing the light timing pattern modules of a Micro QR code

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.

Picture showing the dark version modules Picture showing the dark version modules of a Micro QR code (none)

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.

Picture showing the light version modules Picture showing the light version modules of a Micro QR code (none)