Template:ColorText: Difference between revisions

From He is Coming Official Wiki
Benjiminio (talk | contribs)
first attempt at invokable template for text color
 
Benjiminio (talk | contribs)
mNo edit summary
Line 5: Line 5:


Below is a single example table showing all keywords, their type, and their colors.
Below is a single example table showing all keywords, their type, and their colors.
</noinclude>


</noinclude>
<!-- Only output when template is invoked -->
<!-- Only output when template is invoked -->
<includeonly>
<includeonly>{{#switch: {{{1|}}}|Attack=<span style="color:#e74444;">Attack</span>|Armor=<span style="color:#4179ab;">Armor</span>|Health=<span style="color:#93c13e;">Health</span>|Speed=<span style="color:#ffd569;">Speed</span>|Acid=<span style="color:#ccf61f;">Acid</span>|Freeze=<span style="color:#62abd4;">Freeze</span>|Poison=<span style="color:#bbc44e;">Poison</span>|Purity=<span style="color:#62abd4;">Purity</span>|Regeneration=<span style="color:#9b4c51;">Regeneration</span>|Riptide=<span style="color:#5880cc;">Riptide</span>|Stun=<span style="color:#ffd569;">Stun</span>|Thorns=<span style="color:#8a961f;">Thorns</span>|#default={{{1}}}}</includeonly>
{{#switch: {{{1|}}}
| Acid  = <span style="color:#ccf61f;">Acid</span>
| Armor = <span style="color:#4179ab;">Armor</span>
| Attack = <span style="color:#e74444;">Attack</span>
| Health = <span style="color:#93c13e;">Health</span>
| Speed = <span style="color:#ffd569;">Speed</span>
| Freeze = <span style="color:#62abd4;">Freeze</span>
| Poison = <span style="color:#bbc44e;">Poison</span>
| Purity = <span style="color:#62abd4;">Purity</span>
| Regeneration = <span style="color:#9b4c51;">Regeneration</span>
| Riptide = <span style="color:#5880cc;">Riptide</span>
| Stun = <span style="color:#ffd569;">Stun</span>
| Thorns = <span style="color:#8a961f;">Thorns</span>
| #default = {{{1}}}
}}
</includeonly>


<!-- Example table (only shown on template page) -->
<!-- Example table (only shown on template page) -->
<noinclude>
<noinclude>
{| class="wikitable"
{| class="wikitable"
! Keyword !! Icon !! Type !! Hex
! Keyword !! Type !! Hex
|-
|-
| <span style="color:#e74444;">Attack</span> || [[File:Icon_attack.png|link=]]    || Base stat || #e74444
| <span style="color:#e74444;">Attack</span>       || Base stat || #e74444
|-
|-
| <span style="color:#4179ab;">Armor</span> || [[File:Icon_armor.png|link=]]      || Base stat || #4179ab
| <span style="color:#4179ab;">Armor</span>       || Base stat || #4179ab
|-
|-
| <span style="color:#93c13e;">Health</span> || [[File:Icon_health.png|link=]]    || Base stat || #93c13e
| <span style="color:#93c13e;">Health</span>       || Base stat || #93c13e
|-
|-
| <span style="color:#ffd569;">Speed</span> || [[File:Icon_speed.png|link=]]      || Base stat || #ffd569
| <span style="color:#ffd569;">Speed</span>       || Base stat || #ffd569
|-
|-
| <span style="color:#ccf61f;">Acid</span> || [[File:Icon_acid.png|link=]]        || Status effect || #ccf61f
| <span style="color:#ccf61f;">Acid</span>         || Status effect || #ccf61f
|-
|-
| <span style="color:#62abd4;">Freeze</span> || [[File:Icon_freeze.png|link=]]      || Status effect || #62abd4
| <span style="color:#62abd4;">Freeze</span>       || Status effect || #62abd4
|-
|-
| <span style="color:#bbc44e;">Poison</span> || [[File:Icon_poison.png|link=]]      || Status effect || #bbc44e
| <span style="color:#bbc44e;">Poison</span>       || Status effect || #bbc44e
|-
|-
| <span style="color:#62abd4;">Purity</span> || [[File:Icon_purity.png|link=]]      || Status effect || #62abd4
| <span style="color:#62abd4;">Purity</span>       || Status effect || #62abd4
|-
|-
| <span style="color:#9b4c51;">Regeneration</span> || [[File:Icon_regen.png|link=]] || Status effect || #9b4c51
| <span style="color:#9b4c51;">Regeneration</span> || Status effect || #9b4c51
|-
|-
| <span style="color:#5880cc;">Riptide</span> || [[File:Icon_riptide.png|link=]]    || Status effect || #5880cc
| <span style="color:#5880cc;">Riptide</span>     || Status effect || #5880cc
|-
|-
| <span style="color:#ffd569;">Stun</span> || [[File:Icon_stun.png|link=]]        || Status effect || #ffd569
| <span style="color:#ffd569;">Stun</span>         || Status effect || #ffd569
|-
|-
| <span style="color:#8a961f;">Thorns</span> || [[File:Icon_thorns.png|link=]]      || Status effect || #8a961f
| <span style="color:#8a961f;">Thorns</span>       || Status effect || #8a961f
|}
|}
</noinclude>
</noinclude>

Revision as of 18:40, 5 November 2025

This template colors keywords and optionally links them if a page exists.

Usage: {{ColorText|Attack}}

Below is a single example table showing all keywords, their type, and their colors.



Keyword Type Hex
Attack Base stat #e74444
Armor Base stat #4179ab
Health Base stat #93c13e
Speed Base stat #ffd569
Acid Status effect #ccf61f
Freeze Status effect #62abd4
Poison Status effect #bbc44e
Purity Status effect #62abd4
Regeneration Status effect #9b4c51
Riptide Status effect #5880cc
Stun Status effect #ffd569
Thorns Status effect #8a961f