Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Rarity: Difference between revisions

Template page
m Fix: actually load Template:Rarity/styles.css -- the stylesheet existed but nothing was including it
m Replace reader-visible prose double hyphens with a proper em dash entity
 
Line 14: Line 14:
renders as: {{Rarity|Rare}}
renders as: {{Rarity|Rare}}


The first parameter is the rarity tier (case-insensitive) -- <code>common</code>, <code>uncommon</code>, <code>rare</code>, <code>epic</code>, <code>legendary</code>, or <code>mythic</code>. Left at just that, it prints the tier's own name in its colour. An optional second parameter colours different text as that tier instead, e.g.:
The first parameter is the rarity tier (case-insensitive) &mdash; <code>common</code>, <code>uncommon</code>, <code>rare</code>, <code>epic</code>, <code>legendary</code>, or <code>mythic</code>. Left at just that, it prints the tier's own name in its colour. An optional second parameter colours different text as that tier instead, e.g.:


<pre>{{Rarity|mythic|Ancient}}</pre>
<pre>{{Rarity|mythic|Ancient}}</pre>
Line 20: Line 20:
renders as: {{Rarity|mythic|Ancient}}
renders as: {{Rarity|mythic|Ancient}}


In a sortable wikitable column, sorts by actual rarity order (Common lowest, Mythic highest) rather than alphabetically on the displayed text -- nothing extra needed in the cell's own wikitext for this to work.
In a sortable wikitable column, sorts by actual rarity order (Common lowest, Mythic highest) rather than alphabetically on the displayed text &mdash; nothing extra needed in the cell's own wikitext for this to work.


== Colours ==
== Colours ==

Latest revision as of 14:19, 23 August 2026

Usage

{{Rarity|Rare}}

renders as: Rare

The first parameter is the rarity tier (case-insensitive) — common, uncommon, rare, epic, legendary, or mythic. Left at just that, it prints the tier's own name in its colour. An optional second parameter colours different text as that tier instead, e.g.:

{{Rarity|mythic|Ancient}}

renders as: Ancient

In a sortable wikitable column, sorts by actual rarity order (Common lowest, Mythic highest) rather than alphabetically on the displayed text — nothing extra needed in the cell's own wikitext for this to work.

Colours

Tier Hex
Common Common #FCFCFC
Uncommon Uncommon #23F606
Rare Rare #00B0FC
Epic Epic #B048F8
Legendary Legendary #FABA36
Mythic Mythic #E73521