| 1 |
Module Colors |
| 2 |
============= |
| 3 |
|
| 4 |
By default the QR codes are rendered in black and white but this project |
| 5 |
supports individual colors for each QR Code module type, i.e. the alignment |
| 6 |
and finder patterns may use another color than the data modules. |
| 7 |
|
| 8 |
|
| 9 |
The color values can be provided as tuple ``(R, G, B)``, as web color name |
| 10 |
(like 'red') or as hexadecimal ``#RRGGBB`` value (i.e. '#085A75'). |
| 11 |
|
| 12 |
The value ``None`` is used to indicate transparency, i.e. ``light_color=None`` |
| 13 |
indicates that all light modules should be transparent. |
| 14 |
|
| 15 |
.. code-block:: |
| 16 |
|
| 17 |
{% qr_from_text "Yellow Submarine" dark_color="darkred" data_dark="darkorange" data_light="yellow" %} |
| 18 |
|
| 19 |
|
| 20 |
.. image:: ../_static/colors/yellow-submarine.png |
| 21 |
:alt: Colorful 7-H QR code encoding "Yellow Submarine" |
| 22 |
|
| 23 |
|
| 24 |
.. code-block:: |
| 25 |
|
| 26 |
{% qr_from_text "Rain" dark_color="darkblue" data_dark="steelblue" micro=True %} |
| 27 |
|
| 28 |
.. image:: ../_static/colors/rain.png |
| 29 |
:alt: Colorful M4-Q QR code encoding "RAIN" |
| 30 |
|
| 31 |
|
| 32 |
Module names |
| 33 |
------------ |
| 34 |
|
| 35 |
The following examples show the results of all supported module types. |
| 36 |
The unaffected modules are rendered as grey or white modules, the red modules |
| 37 |
show the result of the keyword. |
| 38 |
|
| 39 |
|
| 40 |
dark_color |
| 41 |
~~~~~~~~~~ |
| 42 |
|
| 43 |
Sets the (default) color of dark modules. |
| 44 |
|
| 45 |
.. image:: ../_static/colors/dark.png |
| 46 |
:alt: Picture showing the dark modules |
| 47 |
|
| 48 |
.. image:: ../_static/colors/mqr_dark.png |
| 49 |
:alt: Picture showing the dark modules of a Micro QR code |
| 50 |
|
| 51 |
|
| 52 |
light_color |
| 53 |
~~~~~~~~~~~ |
| 54 |
|
| 55 |
Sets the (default) color of light modules. |
| 56 |
|
| 57 |
.. image:: ../_static/colors/light.png |
| 58 |
:alt: Picture showing the light modules |
| 59 |
|
| 60 |
.. image:: ../_static/colors/mqr_light.png |
| 61 |
:alt: Picture showing the light modules of a Micro QR code |
| 62 |
|
| 63 |
|
| 64 |
alignment_dark_color |
| 65 |
~~~~~~~~~~~~~~~~~~~~ |
| 66 |
|
| 67 |
Sets the color of the dark alignment pattern modules. |
| 68 |
|
| 69 |
Micro QR Codes don't have alignment patterns. |
| 70 |
|
| 71 |
.. image:: ../_static/colors/alignment_dark.png |
| 72 |
:alt: Picture showing the dark alignment modules |
| 73 |
|
| 74 |
.. image:: ../_static/colors/mqr_alignment_dark.png |
| 75 |
:alt: Picture showing the dark alignment modules of a Micro QR code (none) |
| 76 |
|
| 77 |
|
| 78 |
alignment_light_color |
| 79 |
~~~~~~~~~~~~~~~~~~~~~ |
| 80 |
|
| 81 |
Sets the color of the light alignment pattern modules. |
| 82 |
|
| 83 |
Micro QR Codes don't have alignment patterns. |
| 84 |
|
| 85 |
.. image:: ../_static/colors/alignment_light.png |
| 86 |
:alt: Picture showing the light alignment modules |
| 87 |
|
| 88 |
.. image:: ../_static/colors/mqr_alignment_light.png |
| 89 |
:alt: Picture showing the light alignment modules of a Micro QR code (none) |
| 90 |
|
| 91 |
|
| 92 |
dark_module_color |
| 93 |
~~~~~~~~~~~~~~~~~ |
| 94 |
|
| 95 |
Sets the color of the dark module. |
| 96 |
|
| 97 |
Micro QR Codes don't have a dark module. |
| 98 |
|
| 99 |
.. image:: ../_static/colors/dark_module.png |
| 100 |
:alt: Picture showing the dark modules |
| 101 |
|
| 102 |
.. image:: ../_static/colors/mqr_dark_module.png |
| 103 |
:alt: Picture showing the dark modules of a Micro QR code (none) |
| 104 |
|
| 105 |
|
| 106 |
data_dark_color |
| 107 |
~~~~~~~~~~~~~~~ |
| 108 |
|
| 109 |
Sets the color of the dark data modules. |
| 110 |
|
| 111 |
.. image:: ../_static/colors/data_dark.png |
| 112 |
:alt: Picture showing the dark data modules |
| 113 |
|
| 114 |
.. image:: ../_static/colors/mqr_data_dark.png |
| 115 |
:alt: Picture showing the dark data modules of a Micro QR code |
| 116 |
|
| 117 |
|
| 118 |
data_light_color |
| 119 |
~~~~~~~~~~~~~~~~ |
| 120 |
|
| 121 |
Sets the color of the light data modules. |
| 122 |
|
| 123 |
.. image:: ../_static/colors/data_light.png |
| 124 |
:alt: Picture showing the light modules |
| 125 |
|
| 126 |
.. image:: ../_static/colors/mqr_data_light.png |
| 127 |
:alt: Picture showing the light modules of a Micro QR code |
| 128 |
|
| 129 |
|
| 130 |
finder_dark_color |
| 131 |
~~~~~~~~~~~~~~~~~ |
| 132 |
|
| 133 |
Sets the color of the dark modules of the finder pattern. |
| 134 |
|
| 135 |
.. image:: ../_static/colors/finder_dark.png |
| 136 |
:alt: Picture showing the dark finder modules |
| 137 |
|
| 138 |
.. image:: ../_static/colors/mqr_finder_dark.png |
| 139 |
:alt: Picture showing the dark finder modules of a Micro QR code |
| 140 |
|
| 141 |
|
| 142 |
finder_light_color |
| 143 |
~~~~~~~~~~~~~~~~~~ |
| 144 |
|
| 145 |
Sets the color of the light modules of the finder pattern. |
| 146 |
|
| 147 |
.. image:: ../_static/colors/finder_light.png |
| 148 |
:alt: Picture showing the light finder modules |
| 149 |
|
| 150 |
.. image:: ../_static/colors/mqr_finder_light.png |
| 151 |
:alt: Picture showing the light finder modules of a Micro QR code |
| 152 |
|
| 153 |
|
| 154 |
format_dark_color |
| 155 |
~~~~~~~~~~~~~~~~~ |
| 156 |
|
| 157 |
Sets the color of the dark modules of the format information. |
| 158 |
|
| 159 |
.. image:: ../_static/colors/format_dark.png |
| 160 |
:alt: Picture showing the dark format information modules |
| 161 |
|
| 162 |
.. image:: ../_static/colors/mqr_format_dark.png |
| 163 |
:alt: Picture showing the dark format information modules of a Micro QR code (none) |
| 164 |
|
| 165 |
|
| 166 |
format_light_color |
| 167 |
~~~~~~~~~~~~~~~~~~ |
| 168 |
|
| 169 |
Sets the color of the light modules of the format information. |
| 170 |
|
| 171 |
.. image:: ../_static/colors/format_light.png |
| 172 |
:alt: Picture showing the light format information modules |
| 173 |
|
| 174 |
.. image:: ../_static/colors/mqr_format_light.png |
| 175 |
:alt: Picture showing the light format information modules of a Micro QR code (none) |
| 176 |
|
| 177 |
|
| 178 |
quiet_zone_color |
| 179 |
~~~~~~~~~~~~~~~~ |
| 180 |
|
| 181 |
Sets the color of the quiet zone. |
| 182 |
|
| 183 |
.. image:: ../_static/colors/quiet_zone.png |
| 184 |
:alt: Picture showing the quiet zone |
| 185 |
|
| 186 |
.. image:: ../_static/colors/mqr_quiet_zone.png |
| 187 |
:alt: Picture showing the quiet zone of a Micro QR code |
| 188 |
|
| 189 |
|
| 190 |
separator_color |
| 191 |
~~~~~~~~~~~~~~~ |
| 192 |
|
| 193 |
Sets the color of the separator. |
| 194 |
|
| 195 |
.. image:: ../_static/colors/separator.png |
| 196 |
:alt: Picture showing the separator |
| 197 |
|
| 198 |
.. image:: ../_static/colors/mqr_separator.png |
| 199 |
:alt: Picture showing the separator of a Micro QR code |
| 200 |
|
| 201 |
|
| 202 |
timing_dark_color |
| 203 |
~~~~~~~~~~~~~~~~~ |
| 204 |
|
| 205 |
Sets the color of the dark modules of the timing pattern. |
| 206 |
|
| 207 |
.. image:: ../_static/colors/timing_dark.png |
| 208 |
:alt: Picture showing the dark timing pattern modules |
| 209 |
|
| 210 |
.. image:: ../_static/colors/mqr_timing_dark.png |
| 211 |
:alt: Picture showing the dark timing pattern modules of a Micro QR code |
| 212 |
|
| 213 |
|
| 214 |
timing_light_color |
| 215 |
~~~~~~~~~~~~~~~~~~ |
| 216 |
|
| 217 |
Sets the color of the light modules of the timing pattern. |
| 218 |
|
| 219 |
.. image:: ../_static/colors/timing_light.png |
| 220 |
:alt: Picture showing the light timing pattern modules |
| 221 |
|
| 222 |
.. image:: ../_static/colors/mqr_timing_light.png |
| 223 |
:alt: Picture showing the light timing pattern modules of a Micro QR code |
| 224 |
|
| 225 |
|
| 226 |
version_dark_color |
| 227 |
~~~~~~~~~~~~~~~~~~ |
| 228 |
|
| 229 |
Sets the color of the dark modules of the version information. |
| 230 |
|
| 231 |
Micro QR Codes and QR Codes lesser than version 7 don't carry any version information. |
| 232 |
|
| 233 |
.. image:: ../_static/colors/version_dark.png |
| 234 |
:alt: Picture showing the dark version modules |
| 235 |
|
| 236 |
.. image:: ../_static/colors/mqr_version_dark.png |
| 237 |
:alt: Picture showing the dark version modules of a Micro QR code (none) |
| 238 |
|
| 239 |
|
| 240 |
version_light_color |
| 241 |
~~~~~~~~~~~~~~~~~~~ |
| 242 |
|
| 243 |
Sets the color of the light modules of the version information. |
| 244 |
|
| 245 |
Micro QR Codes and QR Codes lesser than version 7 don't carry any version information. |
| 246 |
|
| 247 |
.. image:: ../_static/colors/version_light.png |
| 248 |
:alt: Picture showing the light version modules |
| 249 |
|
| 250 |
.. image:: ../_static/colors/mqr_version_light.png |
| 251 |
:alt: Picture showing the light version modules of a Micro QR code (none) |