Template:TypeColor: Difference between revisions
Jump to navigation
Jump to search
m (Documentation, fix template name references.) |
(Added color variants, documentation, and attribution.) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{1|}}} | <includeonly>{{#switch: {{{1|}}} | ||
| Normal | | Normal = {{#switch: {{{2|}}} | dark = 6D6D4E | light = C6C6A7 | A8A878 }} | ||
| Fire = {{#switch: {{{2|}}} | | | Fire = {{#switch: {{{2|}}} | dark = 9C531F | light = F5AC78 | F08030 }} | ||
| Water = {{#switch: {{{2|}}} | | | Water = {{#switch: {{{2|}}} | dark = 445E9C | light = 9DB7F5 | 6890F0 }} | ||
| Electric = {{#switch: {{{2|}}} | | | Electric = {{#switch: {{{2|}}} | dark = A1871F | light = FAE078 | F8D030 }} | ||
| Grass = {{#switch: {{{2|}}} | | | Grass = {{#switch: {{{2|}}} | dark = 4E8234 | light = A7DB8D | 78C850 }} | ||
| Ice = {{#switch: {{{2|}}} | | | Ice = {{#switch: {{{2|}}} | dark = 638D8D | light = BCE6E6 | 98D8D8 }} | ||
| Fighting = {{#switch: {{{2|}}} | | | Fighting = {{#switch: {{{2|}}} | dark = 7D1F1A | light = D67873 | C03028 }} | ||
| Poison = {{#switch: {{{2|}}} | | | Poison = {{#switch: {{{2|}}} | dark = 682A68 | light = C183C1 | A040A0 }} | ||
| Ground = {{#switch: {{{2|}}} | | | Ground = {{#switch: {{{2|}}} | dark = 927D44 | light = EBD69D | E0C068 }} | ||
| Flying = {{#switch: {{{2|}}} | | | Flying = {{#switch: {{{2|}}} | dark = 6D5E9C | light = C6B7F5 | A890F0 }} | ||
| Psychic = {{#switch: {{{2|}}} | | | Psychic = {{#switch: {{{2|}}} | dark = A13959 | light = FA92B2 | F85888 }} | ||
| Bug = {{#switch: {{{2|}}} | | | Bug = {{#switch: {{{2|}}} | dark = 6D7815 | light = C6D16E | A8B820 }} | ||
| Rock = {{#switch: {{{2|}}} | | | Rock = {{#switch: {{{2|}}} | dark = 786824 | light = D1C17D | B8A038 }} | ||
| Ghost = {{#switch: {{{2|}}} | | | Ghost = {{#switch: {{{2|}}} | dark = 493963 | light = A292BC | 705898 }} | ||
| Dragon = {{#switch: {{{2|}}} | | | Dragon = {{#switch: {{{2|}}} | dark = 4924A1 | light = A27DFA | 7038F8 }} | ||
| Dark = {{#switch: {{{2|}}} | | | Dark = {{#switch: {{{2|}}} | dark = 49392F | light = A29288 | 705848 }} | ||
| Steel = {{#switch: {{{2|}}} | | | Steel = {{#switch: {{{2|}}} | dark = 787887 | light = D1D1E0 | B8B8D0 }} | ||
| Fairy = {{#switch: {{{2|}}} | | | Fairy = {{#switch: {{{2|}}} | dark = 9B6470 | light = F4BDC9 | EE99AC }} | ||
| | | {{#switch: {{{2|}}} | dark = 44685E | light = 9DC1B7 | 68A090 }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
Retrieves the hexcode associated with a given Pokémon type. | Retrieves the hexcode associated with a given Pokémon type. | ||
< | <strong>Usage:</strong> | ||
{| class=wikitable" width="45%" | <code><nowiki>{{TypeColor|<type>|[option]}}</nowiki></code> | ||
{| class="wikitable" max-width="45%" style="border-spacing: 1em;" | |||
! colspan="2" | Parameters | ! colspan="2" | Parameters | ||
|- | |- | ||
| | ! style="vertical-align: top; text-align: left;" | <type> | ||
| One of the recognized Pokémon types, as listed below. | |||
|- | |- | ||
! style="vertical-align: top; text-align: left;" | [option] | |||
| <em>(Optional)</em> A modifier to | | <em>(Optional)</em> A modifier to the specified color. | ||
Currently recognized options are: | Currently recognized options are: | ||
* <code> | * <code>dark</code>: returns a darker version of the color. | ||
* <code>light</code>: returns a lighter version of the color. | |||
|} | |} | ||
{| class="wikitable" | |||
<strong>Examples:</strong> | |||
Normal color variant: | |||
<code><nowiki>{{TypeColor|Fire}}</nowiki></code> | |||
{{TypeColor|Fire}} | |||
Dark color variant: | |||
<code><nowiki>{{TypeColor|Fire|dark}}</nowiki></code> | |||
{{TypeColor|Fire|dark}} | |||
Light color variant: | |||
<code><nowiki>{{TypeColor|Fire|light}}</nowiki></code> | |||
{{TypeColor|Fire|light}} | |||
{| class="wikitable" style="border-spacing: 1em;" | |||
|- | |- | ||
! Type !! Color !! | ! colspan="4" | Colors | ||
|- | |||
! Type !! Color !! Dark !! Light | |||
|- | |- | ||
| Normal | | Normal | ||
| {{ | | {{ColorSwatch|{{TypeColor|Normal}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Normal|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Normal|light}}}} | |||
|- | |- | ||
| Fire | | Fire | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fire}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fire|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Fire|light}}}} | |||
|- | |- | ||
| Water | | Water | ||
| {{ | | {{ColorSwatch|{{TypeColor|Water}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Water|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Water|light}}}} | |||
|- | |- | ||
| Electric | | Electric | ||
| {{ | | {{ColorSwatch|{{TypeColor|Electric}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Electric|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Electric|light}}}} | |||
|- | |- | ||
| Grass | | Grass | ||
| {{ | | {{ColorSwatch|{{TypeColor|Grass}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Grass|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Grass|light}}}} | |||
|- | |- | ||
| Ice | | Ice | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ice}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ice|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Ice|light}}}} | |||
|- | |- | ||
| Fighting | | Fighting | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fighting}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fighting|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Fighting|light}}}} | |||
|- | |- | ||
| Poison | | Poison | ||
| {{ | | {{ColorSwatch|{{TypeColor|Poison}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Poison|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Poison|light}}}} | |||
|- | |- | ||
| Ground | | Ground | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ground}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ground|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Ground|light}}}} | |||
|- | |- | ||
| Flying | | Flying | ||
| {{ | | {{ColorSwatch|{{TypeColor|Flying}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Flying|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Flying|light}}}} | |||
|- | |- | ||
| Pyschic | | Pyschic | ||
| | {{ | | {{ColorSwatch|{{TypeColor|Psychic}}}} | ||
| {{ColorSwatch|{{TypeColor|Psychic|dark}}}} | |||
| {{ColorSwatch|{{TypeColor|Psychic|light}}}} | |||
|- | |- | ||
| Bug | | Bug | ||
| {{ | | {{ColorSwatch|{{TypeColor|Bug}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Bug|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Bug|light}}}} | |||
|- | |- | ||
| Rock | | Rock | ||
| {{ | | {{ColorSwatch|{{TypeColor|Rock}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Rock|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Rock|light}}}} | |||
|- | |- | ||
| Ghost | | Ghost | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ghost}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Ghost|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Ghost|light}}}} | |||
|- | |- | ||
| Dragon | | Dragon | ||
| {{ | | {{ColorSwatch|{{TypeColor|Dragon}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Dragon|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Dragon|light}}}} | |||
|- | |- | ||
| Dark | | Dark | ||
| {{ | | {{ColorSwatch|{{TypeColor|Dark}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Dark|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Dark|light}}}} | |||
|- | |- | ||
| Steel | | Steel | ||
| {{ | | {{ColorSwatch|{{TypeColor|Steel}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Steel|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Steel|light}}}} | |||
|- | |- | ||
| Fairy | | Fairy | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fairy}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Fairy|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Fairy|light}}}} | |||
|- | |- | ||
| Unknown | | Unknown | ||
| {{ | | {{ColorSwatch|{{TypeColor|Unknown}}}} | ||
| {{ | | {{ColorSwatch|{{TypeColor|Unknown|dark}}}} | ||
| {{ColorSwatch|{{TypeColor|Unknown|light}}}} | |||
|} | |} | ||
</noinclude> | |||
<em>Note: Colors taken from [https://bulbapedia.bulbagarden.net/wiki/Main_Page Bulbapedia's] [https://bulbapedia.bulbagarden.net/wiki/Category:Type_color_templates type color templates] and used under a Creative Commons [https://creativecommons.org/licenses/by-nc-sa/2.5/ Attribution-NonCommercial-ShareAlike 2.5] license.</em></noinclude> |
Revision as of 16:47, 31 December 2023
Retrieves the hexcode associated with a given Pokémon type.
Usage:
{{TypeColor|<type>|[option]}}
Parameters | |
---|---|
<type> | One of the recognized Pokémon types, as listed below. |
[option] | (Optional) A modifier to the specified color.
Currently recognized options are:
|
Examples:
Normal color variant:
{{TypeColor|Fire}}
F08030
Dark color variant:
{{TypeColor|Fire|dark}}
9C531F
Light color variant:
{{TypeColor|Fire|light}}
F5AC78
Colors | |||
---|---|---|---|
Type | Color | Dark | Light |
Normal | A8A878 | 6D6D4E | C6C6A7 |
Fire | F08030 | 9C531F | F5AC78 |
Water | 6890F0 | 445E9C | 9DB7F5 |
Electric | F8D030 | A1871F | FAE078 |
Grass | 78C850 | 4E8234 | A7DB8D |
Ice | 98D8D8 | 638D8D | BCE6E6 |
Fighting | C03028 | 7D1F1A | D67873 |
Poison | A040A0 | 682A68 | C183C1 |
Ground | E0C068 | 927D44 | EBD69D |
Flying | A890F0 | 6D5E9C | C6B7F5 |
Pyschic | F85888 | A13959 | FA92B2 |
Bug | A8B820 | 6D7815 | C6D16E |
Rock | B8A038 | 786824 | D1C17D |
Ghost | 705898 | 493963 | A292BC |
Dragon | 7038F8 | 4924A1 | A27DFA |
Dark | 705848 | 49392F | A29288 |
Steel | B8B8D0 | 787887 | D1D1E0 |
Fairy | EE99AC | 9B6470 | F4BDC9 |
Unknown | 68A090 | 44685E | 9DC1B7 |
Note: Colors taken from Bulbapedia's type color templates and used under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.