1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
|
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.
.. code-block::
{% qr_from_text "Yellow Submarine" dark_color="darkred" data_dark="darkorange" data_light="yellow" %}
.. image:: ../_static/colors/yellow-submarine.png
:alt: Colorful 7-H QR code encoding "Yellow Submarine"
.. code-block::
{% qr_from_text "Rain" dark_color="darkblue" data_dark="steelblue" micro=True %}
.. image:: ../_static/colors/rain.png
:alt: 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.
.. image:: ../_static/colors/dark.png
:alt: Picture showing the dark modules
.. image:: ../_static/colors/mqr_dark.png
:alt: Picture showing the dark modules of a Micro QR code
light_color
~~~~~~~~~~~
Sets the (default) color of light modules.
.. image:: ../_static/colors/light.png
:alt: Picture showing the light modules
.. image:: ../_static/colors/mqr_light.png
:alt: 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.
.. image:: ../_static/colors/alignment_dark.png
:alt: Picture showing the dark alignment modules
.. image:: ../_static/colors/mqr_alignment_dark.png
:alt: 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.
.. image:: ../_static/colors/alignment_light.png
:alt: Picture showing the light alignment modules
.. image:: ../_static/colors/mqr_alignment_light.png
:alt: 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.
.. image:: ../_static/colors/dark_module.png
:alt: Picture showing the dark modules
.. image:: ../_static/colors/mqr_dark_module.png
:alt: Picture showing the dark modules of a Micro QR code (none)
data_dark_color
~~~~~~~~~~~~~~~
Sets the color of the dark data modules.
.. image:: ../_static/colors/data_dark.png
:alt: Picture showing the dark data modules
.. image:: ../_static/colors/mqr_data_dark.png
:alt: Picture showing the dark data modules of a Micro QR code
data_light_color
~~~~~~~~~~~~~~~~
Sets the color of the light data modules.
.. image:: ../_static/colors/data_light.png
:alt: Picture showing the light modules
.. image:: ../_static/colors/mqr_data_light.png
:alt: Picture showing the light modules of a Micro QR code
finder_dark_color
~~~~~~~~~~~~~~~~~
Sets the color of the dark modules of the finder pattern.
.. image:: ../_static/colors/finder_dark.png
:alt: Picture showing the dark finder modules
.. image:: ../_static/colors/mqr_finder_dark.png
:alt: 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.
.. image:: ../_static/colors/finder_light.png
:alt: Picture showing the light finder modules
.. image:: ../_static/colors/mqr_finder_light.png
:alt: 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.
.. image:: ../_static/colors/format_dark.png
:alt: Picture showing the dark format information modules
.. image:: ../_static/colors/mqr_format_dark.png
:alt: 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.
.. image:: ../_static/colors/format_light.png
:alt: Picture showing the light format information modules
.. image:: ../_static/colors/mqr_format_light.png
:alt: Picture showing the light format information modules of a Micro QR code (none)
quiet_zone_color
~~~~~~~~~~~~~~~~
Sets the color of the quiet zone.
.. image:: ../_static/colors/quiet_zone.png
:alt: Picture showing the quiet zone
.. image:: ../_static/colors/mqr_quiet_zone.png
:alt: Picture showing the quiet zone of a Micro QR code
separator_color
~~~~~~~~~~~~~~~
Sets the color of the separator.
.. image:: ../_static/colors/separator.png
:alt: Picture showing the separator
.. image:: ../_static/colors/mqr_separator.png
:alt: Picture showing the separator of a Micro QR code
timing_dark_color
~~~~~~~~~~~~~~~~~
Sets the color of the dark modules of the timing pattern.
.. image:: ../_static/colors/timing_dark.png
:alt: Picture showing the dark timing pattern modules
.. image:: ../_static/colors/mqr_timing_dark.png
:alt: 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.
.. image:: ../_static/colors/timing_light.png
:alt: Picture showing the light timing pattern modules
.. image:: ../_static/colors/mqr_timing_light.png
:alt: 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.
.. image:: ../_static/colors/version_dark.png
:alt: Picture showing the dark version modules
.. image:: ../_static/colors/mqr_version_dark.png
:alt: 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.
.. image:: ../_static/colors/version_light.png
:alt: Picture showing the light version modules
.. image:: ../_static/colors/mqr_version_light.png
:alt: Picture showing the light version modules of a Micro QR code (none)
|