Difference between revisions of "Template:Genshincolor"
Line 16: | Line 16: | ||
-->{{#if:{{{2|}}}|{{color|{{#var:colortable}}{{#switch: regular |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}} = ;font-family: italic; font-size: 1.2em;}}|{{{2|}}}}}|{{#var:colortable}}}}</includeonly><noinclude> | -->{{#if:{{{2|}}}|{{color|{{#var:colortable}}{{#switch: regular |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}} = ;font-family: italic; font-size: 1.2em;}}|{{{2|}}}}}|{{#var:colortable}}}}</includeonly><noinclude> | ||
− | ;This template is used to express the colors of the seven elements in Genshin Impact | + | ;This template is used to express the colors of the seven elements in ''[[Genshin Impact]]''. |
* {{genshincolor|Pyro|{{genshincolor|Pyro}} (Pyro)}} | * {{genshincolor|Pyro|{{genshincolor|Pyro}} (Pyro)}} | ||
* {{genshincolor|Hydro|{{genshincolor|Hydro}} (Hydro)}} | * {{genshincolor|Hydro|{{genshincolor|Hydro}} (Hydro)}} | ||
Line 27: | Line 27: | ||
* {{genshincolor|text|{{genshincolor|text}} (Brown text)}} | * {{genshincolor|text|{{genshincolor|text}} (Brown text)}} | ||
; Genshin Impact colors | ; Genshin Impact colors | ||
− | * {{genshincolor|1-star|{{genshincolor|1-star}} (1- | + | * {{genshincolor|1-star|{{genshincolor|1-star}} (1-Star)}} |
− | * {{genshincolor|2-star|{{genshincolor|2-star}}(2- | + | * {{genshincolor|2-star|{{genshincolor|2-star}} (2-Star)}} |
− | * {{genshincolor|3-star|{{genshincolor|3-star}} (3- | + | * {{genshincolor|3-star|{{genshincolor|3-star}} (3-Star)}} |
− | * {{genshincolor|4-star|{{genshincolor|4-star}}(4- | + | * {{genshincolor|4-star|{{genshincolor|4-star}} (4-Star)}} |
− | * {{genshincolor|5-star|{{genshincolor|5-star}}(5- | + | * {{genshincolor|5-star|{{genshincolor|5-star}} (5-Star)}} |
; Template details: | ; Template details: | ||
Line 46: | Line 46: | ||
3. Use the default item | 3. Use the default item | ||
− | |||
<pre>{{genshincolor|{{{Vision|}}}|default=<nowiki>#FF0000</nowiki>}}</pre> | <pre>{{genshincolor|{{{Vision|}}}|default=<nowiki>#FF0000</nowiki>}}</pre> | ||
The output is: {{genshincolor|{{{Vision|}}}|default=#FF0000}}. It is usually embedded in a general-purpose template. For example, if you do not fill in the "vision" parameter, it will output a non-personalized general color. | The output is: {{genshincolor|{{{Vision|}}}|default=#FF0000}}. It is usually embedded in a general-purpose template. For example, if you do not fill in the "vision" parameter, it will output a non-personalized general color. |
Revision as of 23:40, 27 March 2022
- This template is used to express the colors of the seven elements in Genshin Impact.
- #EC4923 (Pyro)
- #00BFFF (Hydro)
- #359697 (Anemo)
- #945dc4 (Electro)
- #608a00 (Dendro) (currently judged by grass creatures in the game)
- #4682B4 (Cryo)
- #debd6c (Geo)
- #939393 (None) (the panel color of the protagonist without attributes in the game)
- #c8a079 (Brown text)
- Genshin Impact colors
- #85949c (1-Star)
- #649c74 (2-Star)
- #54a4b4 (3-Star)
- #9174a9 (4-Star)
- #dca454 (5-Star)
- Template details
{{genshincolor|element (required)|text (optional)|default=default color (custom optional)}}
- How to use
1. Use only the first item (required):
{{genshincolor|Pyro}}
The output is: #EC4923, which simply outputs the color corresponding code, which is generally used for complex formats, not just for text.
2. Use the first and second items at the same time
{{genshincolor|Geo|Morax}}
The output is: Morax, the text corresponding to the element color.
3. Use the default item
{{genshincolor|{{{Vision|}}}|default=#FF0000}}
The output is: #00BFFF. It is usually embedded in a general-purpose template. For example, if you do not fill in the "vision" parameter, it will output a non-personalized general color.
Note that in general, when it is used for templates, it is not a simple black parameter, but a hexadecimal code with a hash mark such as #FF0000. Please add #
, or use {{ce|#}}
to insert the former, so as not to be recognized as Wikitext and cause formatting to break.