Difference between revisions of "Template:ItemColor/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
m
Line 7: Line 7:
 
</noinclude>
 
</noinclude>
  
==Description<==
+
== 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, though in some cases it may be useful where you wish to create a similar effect to [[:Template:ItemRarity]], but with additional inline styles or without the linking behavior in that template.
 
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, though in some cases it may be useful where you wish to create a similar effect to [[:Template:ItemRarity]], but with additional inline styles or without the linking behavior in that template.
  

Revision as of 16:20, 28 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, though in some cases it may be useful where you wish to create a similar effect to Template:ItemRarity, but with additional inline styles or without the linking behavior in that template.

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.

Examples

Code Result
<span style="{{ItemColor|Legendary}}">This is a legendary item.</span>
This is a legendary item.
<span style="{{ItemColor|4}}">And this one has four mods.</span>
And this one has four mods.
<span style="background-color:black;{{ItemColor|L}}font-size:24px;">Can also be combined with other inline css styles.</span>
Can also be combined with other inline css styles.