Template:Sortable quality/doc

This template returns text formatted with one of the quality colors, and also returns a number in a hidden div before it. The hidden div is a hack that allows proper sorting when quality (or rarity) is used as a column in a sortable table. Otherwise, the sort would be alphabetical, which is not the most logical way to sort by quality levels.

Usage:

text is optional. When omitted, it returns the name of the quality level in the appropriate color.