Template:Infobox nc: Difference between revisions
(added silver/mechanic colour) |
(added deprecated notice. No longer used) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{2|}}} | <includeonly>{{#switch: {{lc:{{{2|}}}}} | ||
|text={{#switch: {{{1|}}} | |text={{#switch: {{lc:{{{1|}}}}} | ||
| | |||
| | |weapon |weapon - crafted |weaponcrafted |tool |tool/weapon |toolweapon |material |food |drink |literature |book |clothing |bag |baggage |container |medical |health |firstaid |first aid |vehicle |vehicles |mechanics |mechanic |construction |earth |carpentry |metalworking |water |aqua |gardening |farming |farm |grass |outdoors |electronics |electricity |electrical |electric |engineering |community |#default = ffffff | ||
}} | |||
}} | |link={{#switch: {{lc:{{{1|}}}}} | ||
|{{#switch: {{{1|}}} | |weapon |weapon - crafted |weaponcrafted = d8ad51 | ||
| | |tool |tool/weapon |toolweapon |material |food |drink |literature |book |clothing |bag |baggage |container |medical |health |firstaid |first aid |vehicle |vehicles |mechanics |mechanic |construction |earth |carpentry |metalworking |water |aqua |gardening |farming |farm |grass |outdoors |electronics |electricity |electrical |electric |engineering = d5d0c5 | ||
| | |community = c1d6dd | ||
| | |#default = ddd6c1 | ||
| | }} | ||
| | |light={{#switch: {{lc:{{{1|}}}}} | ||
| | |weapon |weapon - crafted |weaponcrafted = b3525d | ||
| | |tool |tool/weapon |toolweapon |material = 6b87b9 | ||
| | |food |drink = 6bb994 | ||
| | |literature |book = b99f6b | ||
| | |clothing |bag |baggage |container = 826bb9 | ||
| | |medical |health |firstaid |first aid = b96b7c | ||
|vehicle |vehicles |mechanics |mechanic = 8a9a92 | |||
|construction |earth |carpentry |metalworking = 8b6e51 | |||
|water |aqua = 4b7682 | |||
|gardening |farming |farm |grass |outdoors = 4a7e49 | |||
| | |electronics |electricity |electrical |electric |engineering = e0a64b | ||
| | |community = 185893 | ||
| | |#default = b22328 | ||
| | }} | ||
| | |dark={{#switch: {{lc:{{{1|}}}}} | ||
|weapon |weapon - crafted |weaponcrafted = 440000 | |||
|tool |tool/weapon |toolweapon |material = 2f3f5d | |||
| | |food |drink = 2f5d47 | ||
| | |literature |book = 5d4e2f | ||
| | |clothing |bag |baggage |container = 3c2f5d | ||
| | |medical |health |firstaid |first aid = 5d2f39 | ||
| | |vehicle |vehicles |mechanics |mechanic = 414a46 | ||
|construction |earth |carpentry |metalworking = 463423 | |||
| | |water |aqua = 213a41 | ||
| | |gardening |farming |farm |grass |outdoors = 203f20 | ||
| | |electronics |electricity |electrical |electric |engineering = 84451a | ||
| | |community = 185893 | ||
| | |#default = 360000 | ||
| | }} | ||
|body={{#switch: {{lc:{{{1|}}}}} | |||
|weapon|weapon - crafted |weaponcrafted = f2e6e7 | |||
|- | |tool|tool/weapon|toolweapon|material = e6eaf2 | ||
| | |food|drink = e6f2ec | ||
| | |literature|book = f2ede6 | ||
| | |clothing|bag|baggage|container = eae6f2 | ||
| | |medical|health|firstaid|first aid = f2e6e9 | ||
| | |vehicle|vehicles|mechanics|mechanic = e6f2ec | ||
| | |construction|earth|carpentry|metalworking = e6f0f2 | ||
| | |water|aqua = e6eff2 | ||
| | |gardening|farming|farm|grass|outdoors = e7f2e6 | ||
| | |electronics|electricity|electrical|electric|engineering| = efebe3 | ||
| | |community = ebf3f4 | ||
| | |#default = f4f3eb | ||
| | }} | ||
|#default={{#switch: {{lc:{{{1|}}}}} | |||
|- | |weapon|weapon - crafted |weaponcrafted = 931e2b | ||
| | |tool|tool/weapon|material = 4f6999 | ||
| | |food|drink = 4f9976 | ||
| | |literature|book = 99814f | ||
| | |clothing|bag|baggage|container = 654f99 | ||
| | |medical|health|firstaid|first aid = 994f5f | ||
| | |vehicle|vehicles|mechanics|mechanic = 6c7b74 | ||
| | |construction|earth|carpentry|metalworking = 73583b | ||
| | |water|aqua = 375f6b | ||
|gardening|farming|farm|grass|outdoors = 356835 | |||
|electronics|electricity|electrical|electric|engineering = c77e37 | |||
|community = 185893 | |||
|#default = 68191b | |||
</noinclude> | }} | ||
}}</includeonly><noinclude>{{Deprecated}}{{Protection}}{{Documentation}}[[Category:Metatemplates]]</noinclude> |
Latest revision as of 09:59, 25 February 2024
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)