Template:ColorBracket

Usage
This template is meant to show what a color value will look like. It outputs a span with the background set to the provided color. Custom display text may also be provided.


 * Parameter 1: The color to use.
 * Parameter 2: Use color value as the display text.
 * If any value is provided, such as Y, then the value from Parameter 1 will be shown in the brackets, and Parameter 3 will be ignored.
 * If not provided, Parameter 3 will be used.
 * Parameter 3: Custom display text.
 * If not provided, 8 non-breaking spaces will be used.

A typical use for this template would be in the usage documentation of another template that accepts a color parameter, but a default will be used if not provided. Refer to the Examples below for details.

Syntax:

Color Only

 * Only provides the color value.

Usage:
 * MyColorParm: Some color value. Default value is #FF0000:

Output:


 * MyColorParm: Some color value. Default value is #FF0000: &#091;       &#093;

Color as Text

 * Color value and flag to use it as the display text.

Usage:
 * MyColorParm: Some color value. Default value is #FF0000:

Output:


 * MyColorParm: Some color value. Default value is #FF0000: &#091; #FF0000 &#093;

Custom Text

 * Color value and custom text. Note that the 2nd parameter is empty.

Usage:
 * MyColorParm: Some color value. Default value is #FF0000:

Output:


 * MyColorParm: Some color value. Default value is #FF0000: &#091; Sample Text &#093;

Default Output
&#091; &#093;