Difference between revisions of "Template:Color"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(added new keywords and colors from the list)
old>Phoe nixx
(make parameter case insensitive, add "condition" - same color as "mental")
Line 1: Line 1:
<includeonly><span style="color:{{#switch: {{{1}}}
<includeonly><span style="color:{{#switch: {{lc:{{{1}}}}}
|-
|-
|neg
|neg
|Negative
|negative
|Physical = #9e1b31
|physical = #9e1b31
|+
|+
|pos
|pos
|Positive = #78d199
|positive = #78d199
|Magical
|magical
|Rare = #4c7fff
|rare = #4c7fff
|Uncommon = #59db4c
|uncommon = #59db4c
|Unique = #8248bc
|unique = #8248bc
|Cursed = #824858
|cursed = #824858
|Epic = #ffb72b
|epic = #ffb72b
|Energy = #21b7ec
|energy = #21b7ec
|Passive = #a3b719
|passive = #a3b719
|White = #ffffff
|white = #ffffff
|Brown = #95796a
|brown = #95796a
|Orange = #f6bb15
|orange = #f6bb15
|Gray = #9d9a9a
|gray = #9d9a9a
|Req = #71725e
|req = #71725e
|Red = #c75c5d
|red = #c75c5d
|Active
|active
|State
|state
|Flawless
|flawless
|Caustic = #0ed78e
|caustic = #0ed78e
|Fire = #f28d31
|fire = #f28d31
|Arcane = #9872ec
|arcane = #9872ec
|Sacred = #fff6b5
|sacred = #fff6b5
|Shock = #fff6b5
|shock = #fff6b5
|Unholy = #ec4d49
|unholy = #ec4d49
|Poison = #58af13
|poison = #58af13
|Psionic = #504aea
|psionic = #504aea
|Frost = #73c0de
|frost = #73c0de
|Ench
|ench
|Mental = #27b1ea
|condition
|mental = #27b1ea
|#default = #E0E0E0}};white-space: nowrap;">{{{2}}}</span></includeonly><noinclude>{{doc}}
|#default = #E0E0E0}};white-space: nowrap;">{{{2}}}</span></includeonly><noinclude>{{doc}}


[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Revision as of 12:05, 29 May 2020

Template-info.png Documentation

Colors text based on Stoneshard colors. Shortcut: {{c}}

Usage:


  • First parameter is the color keyword. One color can use multiple keywords. For example {{c|+|Text}} and {{c|positive|Text}} both produce Text. See Community portal for a listing of keywords.
  • Second parameter (optional) is the text you want to colorize. If omitted, the keyword is used. For example {{c|Orange}} produces {{{2}}} and {{c|Orange|Passive Bonus}} produces Passive Bonus.
  • Third parameter (optional) is the white-space: nowrap option. You can enter anything as the third parameter - {{c|+|Test words|0}} or {{c|+|Test words|yes}} produces the same results.

Default text:

<div style="width:50px;border:1px solid;">{{c|+|Test words}}</div>
Test words


Text with nowrap:

<div style="width:50px;border:1px solid;">{{c|+|Test words|f}}</div>
Test words