Template:Infobox nc
This template is deprecated.
This template will eventually be removed.
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)