Difference between revisions of "Template:Genshincolor"

From Moegirlpedia
Jump to: navigation, search
m (先把这个修了)
Line 1: Line 1:
<includeonly>{{#vardefine:颜色表|{{#switch:{{{1|}}}<!--
+
<includeonly>{{#vardefine:colortable|{{#switch:{{{1|}}}<!--
 
-->|Pyro=&#35;EC4923|Hydro=&#35;00BFFF|Anemo=&#35;359697|Electro=&#35;945dc4|Dendro=&#35;608a00|Cryo=&#35;4682B4|Geo=&#35;debd6c|None=&#35;939393<!--
 
-->|Pyro=&#35;EC4923|Hydro=&#35;00BFFF|Anemo=&#35;359697|Electro=&#35;945dc4|Dendro=&#35;608a00|Cryo=&#35;4682B4|Geo=&#35;debd6c|None=&#35;939393<!--
 
|OFPyro=&#35;EC4923|OFHydro=&#35;00BFFF|OFAnemo=&#35;359697|OFElectro=&#35;945dc4|OFCryo=&#35;4682B4|OFGeo=&#35;debd6c
 
|OFPyro=&#35;EC4923|OFHydro=&#35;00BFFF|OFAnemo=&#35;359697|OFElectro=&#35;945dc4|OFCryo=&#35;4682B4|OFGeo=&#35;debd6c
-->|星尘|命星=&#35;a256e1<!--
+
-->|stardust|constellation=&#35;a256e1<!--
-->|星辉=&#35;bd6932<!--
+
-->|starglitter=&#35;bd6932<!--
-->|五星=&#35;dca454<!--
+
-->|5-star=&#35;dca454<!--
-->|四星=&#35;9174a9<!--
+
-->|4-star=&#35;9174a9<!--
-->|三星=&#35;54a4b4<!--
+
-->|3-star=&#35;54a4b4<!--
-->|二星=&#35;649c74<!--
+
-->|2-star=&#35;649c74<!--
-->|一星=&#35;85949c<!--
+
-->|1-star=&#35;85949c<!--
 
-->|data=&#35;c93f23<!--
 
-->|data=&#35;c93f23<!--
 
-->|text<!--奔行世间-->=&#35;c8a079<!--
 
-->|text<!--奔行世间-->=&#35;c8a079<!--
 
-->|text2=&#35;bd6932<!--
 
-->|text2=&#35;bd6932<!--
 
-->|delusion=<nowiki>black</nowiki><!--
 
-->|delusion=<nowiki>black</nowiki><!--
-->|{{{default|black}}}}}}}<!--修改颜色或添加新颜色时,仅修改此处
+
-->|{{{default|black}}}}}}}<!--When editing a color or adding a new color, only edit here
  
-->{{#if:{{{2|}}}|{{color|{{#var:颜色表}}{{#switch: regular |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}} = ;font-family: italic; font-size: 1.2em;}}|{{{2|}}}}}|{{#var:颜色表}}}}</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)}}
Line 24: Line 24:
 
* {{genshincolor|Cryo|{{genshincolor|Cryo}} (Cryo)}}
 
* {{genshincolor|Cryo|{{genshincolor|Cryo}} (Cryo)}}
 
* {{genshincolor|Geo|{{genshincolor|Geo}} (Geo)}}
 
* {{genshincolor|Geo|{{genshincolor|Geo}} (Geo)}}
* {{genshincolor|None|{{genshincolor|none}}(None)}} (the panel color of the protagonist without attributes in the game)
+
* {{genshincolor|None|{{genshincolor|none}} (None)}} (the panel color of the protagonist without attributes in the game)
* {{genshincolor|text|{{genshincolor|text}}(Brown text)}}
+
* {{genshincolor|text|{{genshincolor|text}} (Brown text)}}
 
; Genshin Impact colors
 
; Genshin Impact colors
* {{genshincolor|one star|{{genshincolor|one star}} (one star)}}
+
* {{genshincolor|1-star|{{genshincolor|1-star}} (1-star)}}
* {{genshincolor|two stars|{{genshincolor|two stars}}(two stars)}}
+
* {{genshincolor|2-star|{{genshincolor|2-star}}(2-star)}}
* {{genshincolor|three stars|{{genshincolor|three stars}} (three-star)}}
+
* {{genshincolor|3-star|{{genshincolor|3-star}} (3-star)}}
* {{genshincolor|Four Stars|{{genshincolor|Four Stars}}(Four Stars)}}
+
* {{genshincolor|4-star|{{genshincolor|4-star}}(4-star)}}
* {{genshincolor|Five Stars|{{genshincolor|Five Stars}}(Five Stars)}}
+
* {{genshincolor|5-star|{{genshincolor|5-star}}(5-star)}}
  
 
; Template details:
 
; Template details:
Line 50: Line 50:
 
The output is: {{genshincolor|{{{Vision|}}}|default=&#35;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=&#35;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.
  
Note that in general, when it is used for template use, it is not a simple black parameter, but a hexadecimal code with a hash mark such as &#35;FF0000. Please add <code>{{ce|&}}{{ce|#}}35{{ce|;}}</code>, or use <code>{{tl|ce|#}}</code > to insert the former, so as not to be recognized as Wikitext and cause formatting to break.
+
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 &#35;FF0000. Please add <code>{{ce|&}}{{ce|#}}35{{ce|;}}</code>, or use <code>{{tl|ce|#}}</code> to insert the former, so as not to be recognized as Wikitext and cause formatting to break.
 
[[Category:Genshin Impact templates]]
 
[[Category:Genshin Impact templates]]
 
</noinclude>
 
</noinclude>

Revision as of 23:37, 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 &#35;, or use {{ce|#}} to insert the former, so as not to be recognized as Wikitext and cause formatting to break.