Template:Rarity Color

Usage
It is common for templates to need a conditional statement to find a color value to use based on item rarity. This template is made so this code is more compact within templates. This also makes it easy to update all templates at once if Nexon decides that Magenta, or some other color, is to be added to the possible rarity colors. This template can be used in tree different ways which are explained below.

Current colors are:
 * white
 * green
 * blue
 * purple

Note: Although this was originally thought of as a way to simplify template code it might also be helpful on any page where you may want to show an item name with its proper coloring.

Color Code
If you want just want the color code so you can use it in a style declaration use: If blue is specified as a color this will produce: color: #81A7FD;

This allows authors to simplify their style coding anywhere they might want to colorize text by rarity. For example the Item and Equipment templates change the color style attribute of the cell in their tables which contain the name of the items they are representing. This would look like: 

Spans
To further simplify things this template can be used to make a span: would produce Crescent Moon, the html code for which looks like: Crescent Moon

This allows easy inline coloring of item names.

Links
This expands on the span usage producing a colorized link.

The first use here assumes the target and label are the same while the second allows the target and content to be different. This corresponds to target and label respectively.