Template:ItemColor/doc: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Alleryn (talk | contribs)
Created page with "<includeonly> <!-- Categories/interwikis for the template itself --> Category:Formatting templates </includeonly><noinclude> <!-- Categories/interwikis for this documentat..."
 
Alleryn (talk | contribs)
Line 25: Line 25:
! Result
! Result
|-
|-
  | <pre><span style="{{ItemColor|Legendary}}"</span></pre>
  | <pre><span style="{{ItemColor|Legendary}}This is a legendary item."</span></pre>
  | <span style="{{ItemColor|Legendary}}"</span>
  | <span style="{{ItemColor|Legendary}}This is a legendary item."</span>
|}
|}

Revision as of 22:59, 27 November 2020


Description<

Returns the inline-css-style to make the color the correct one for an item of the given rarity. Used in Template:ITEM infobox and Template:ItemRarity; it is unlikely you will want to use this template directly.

Syntax

{{ItemColor|rarity}}

Parameters

  • First and only parameter (required): The rarity whose color you wish to express. This can be any of:
    • The full word description of the rarity: Uncommon, Rare, Exceptional, Epic, Legendary (capitalized or not)
    • The number of mods on an item of that rarity: 1, 2, 3, 4, 5
    • A one letter abbreviation for that rarity: u, r, x, p, l (capitalized or not)
    • Any other values default to the color white, which can be used for common items.

Example

Code Result
<span style="{{ItemColor|Legendary}}This is a legendary item."</span>
<span style="text-shadow: 0 0 2px black, 0 0 2px black, 0 0 2px black, 0 0 2px black; color:#FFFF22;This is a legendary item."