Template:Infobox nc
This page has been put into protection by a PZwiki administrator.
Only users in the sysop user group may edit this page.
The
{{Infobox nc}}
template is used to output a hex code based on the input.
Usage
The intended use is inside CSS "style" attributes to define the "color" element, outputing the appropriate hex code.
Example | Produces | Description |
---|---|---|
{{Infobox nc|Weapon}}
|
B3525D | The value in the first position is used to define the color category, then the second position defines the color type. The output is a hex value. |
{{Infobox nc}}
|
68191B | Defining no values will return the default hex value. |
<span style="background-color: #{{Infobox nc|Weapon|Dark}}; color: #{{Infobox nc|Weapon|Text}};"> EXAMPLE </span> |
EXAMPLE | Here we've used a span tag with the template defining the value of the "color" and "background-color" properties. |
[[Project Zomboid Wiki|<span style="background-color: #{{Infobox nc|Community}}; color: #{{Infobox nc|Community|Link}};"> EXAMPLE </span>]] |
EXAMPLE | Again, using the span tag we've defined the "color" and "background-color" properties, but this time by putting it inside the wikilink we can define the color of the link text. |
Parameters
The below table shows the inputs (color category and type) and the corresponding hex codes that are output.
Parameter | Description | Status |
---|---|---|
1
|
Used to define the color category. e.g. "Weapon". | required |
2
|
Used to pick the color type. e.g. "Light" or "Text". | optional |
Accepted values
Color category (1) | Color type (2) | |||||
---|---|---|---|---|---|---|
Dark | Normal | Light | Body | Text | Link | |
Weapon
|
440000 | 931E2B | B3525D | F2E6E7 | FFFFFF | D8AD51 |
Tool
|
2F3F5D | 4F6999 | 6B87B9 | E6EAF2 | FFFFFF | D5D0C5 |
Food
|
2F5D47 | 4F9976 | 6BB994 | E6F2EC | FFFFFF | D5D0C5 |
Literature
|
5D4E2F | 99814F | B99F6B | F2EDE6 | FFFFFF | D5D0C5 |
Clothing
|
3C2F5D | 654F99 | 826BB9 | EAE6F2 | FFFFFF | D5D0C5 |
FirstAid
|
5D2F39 | 994F5F | B96B7C | F2E6E9 | FFFFFF | D5D0C5 |
Vehicle
|
414A46 | 6C7B74 | 8A9A92 | E6F2EC | FFFFFF | D5D0C5 |
Construction
|
463423 | 73583B | 8B6E51 | E6F0F2 | FFFFFF | D5D0C5 |
Water
|
213A41 | 375F6B | 4B7682 | E6EFF2 | FFFFFF | D5D0C5 |
Gardening
|
203F20 | 356835 | 4A7E49 | E7F2E6 | FFFFFF | D5D0C5 |
Electronics
|
84451A | C77E37 | E0A64B | EFEBE3 | FFFFFF | D5D0C5 |
Community
|
185893 | 185893 | 185893 | EBF3F4 | FFFFFF | C1D6DD |
default | 360000 | 68191B | B22328 | F4F3EB | FFFFFF | DDD6C1 |
Documentation transcluded from Template:Infobox nc/doc.
Editors can experiment in this template's sandbox (create)
Editors can experiment in this template's sandbox (create)