« Modèle:Elementcolor » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
<includeonly>{{#switch: {{{1|}}} | <includeonly>{{#switch: {{{1|}}} | ||
| Banal = {{b-color}} | | Banal = {{b-color|{{{2|}}}}} | ||
| Aqua = {{a-color}} | | Aqua = {{a-color|{{{2|}}}}} | ||
| Pyro = {{p-color}} | | Pyro = {{p-color|{{{2|}}}}} | ||
| Terra = {{t-color}} | | Terra = {{t-color|{{{2|}}}}} | ||
| Électro = {{e-color}} | | Électro = {{e-color|{{{2|}}}}} | ||
| Chaos = {{ch-color}} | | Chaos = {{ch-color|{{{2|}}}}} | ||
| Céleste = {{ce-color}} | | Céleste = {{ce-color|{{{2|}}}}} | ||
| #default = <nowiki>#FA5</nowiki> | | #default = <nowiki>#FA5</nowiki> | ||
}}</includeonly><noinclude>Given the name of an element, will return the color associated with it in hexadecimal format. | }}</includeonly><noinclude>Given the name of an element, will return the color associated with it in hexadecimal format. | ||
Ligne 12 : | Ligne 12 : | ||
Usage: | Usage: | ||
<code><nowiki>{{elementcolor |Banal}}</nowiki></code> returns <span style="color:{{elementcolor |Banal}};">Banal</span> | <code><nowiki>{{elementcolor|Banal}}</nowiki></code> returns <span style="color:{{elementcolor|Banal}};">Banal</span> | ||
<code><nowiki>{{elementcolor | | <code><nowiki>{{elementcolor|Banal|lighter}}</nowiki></code> returns <span style="color:{{elementcolor|Banal|lighter}};">Banal</span> | ||
<code><nowiki>{{elementcolor |Céleste}}</nowiki></code> returns <span style="color:{{elementcolor |Céleste}};">Céleste</span> | <code><nowiki>{{elementcolor|Banal|dark}}</nowiki></code> returns <span style="color:{{elementcolor|Banal|dark}};">Banal</span> | ||
<code><nowiki>{{elementcolor|Aqua}}</nowiki></code> returns <span style="color:{{elementcolor|Aqua}};">Aqua</span> | |||
<code><nowiki>{{elementcolor|Aqua|lighter}}</nowiki></code> returns <span style="color:{{elementcolor|Aqua|lighter}};">Aqua</span> | |||
<code><nowiki>{{elementcolor|Aqua|dark}}</nowiki></code> returns <span style="color:{{elementcolor|Aqua|dark}};">Aqua</span> | |||
<code><nowiki>{{elementcolor|Céleste}}</nowiki></code> returns <span style="color:{{elementcolor|Céleste}};">Céleste</span> | |||
<code><nowiki>{{elementcolor|Céleste|lighter}}</nowiki></code> returns <span style="color:{{elementcolor|Céleste|lighter}};">Céleste</span> | |||
<code><nowiki>{{elementcolor|Céleste|dark}}</nowiki></code> returns <span style="color:{{elementcolor|Céleste|dark}};">Céleste</span> | |||
[[Category:Color templates]] | [[Category:Color templates]] | ||
</noinclude> | </noinclude> |
Version du 19 novembre 2023 à 22:49
Given the name of an element, will return the color associated with it in hexadecimal format.
Usage:
{{elementcolor|Banal}}
returns Banal
{{elementcolor|Banal|lighter}}
returns Banal
{{elementcolor|Banal|dark}}
returns Banal
{{elementcolor|Aqua}}
returns Aqua
{{elementcolor|Aqua|lighter}}
returns Aqua
{{elementcolor|Aqua|dark}}
returns Aqua
{{elementcolor|Céleste}}
returns Céleste
{{elementcolor|Céleste|lighter}}
returns Céleste
{{elementcolor|Céleste|dark}}
returns Céleste