Template:ColorBracket

Usage[edit]

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:

{{ColorBracket|COLOR_VALUE|USE_COLOR|CUSTOM_TEXT}}

Examples[edit]

Color Only[edit]

  • Only provides the color value.

Usage:

* '''MyColorParm''': Some color value.<br/>''Default value is #FF0000'': {{ColorBracket|#FF0000}}

Output:

  • MyColorParm: Some color value.
    Default value is #FF0000: [        ]

Color as Text[edit]

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

Usage:

* '''MyColorParm''': Some color value.<br/>''Default value is #FF0000'': {{ColorBracket|#FF0000|Y}}

Output:

  • MyColorParm: Some color value.
    Default value is #FF0000: [ #FF0000 ]

Custom Text[edit]

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

Usage:

* '''MyColorParm''': Some color value.<br/>''Default value is #FF0000'': {{ColorBracket|#FF0000||Sample Text}}

Output:

  • MyColorParm: Some color value.
    Default value is #FF0000: [ Sample Text ]

Default Output[edit]

[        ]

This article uses material from the "Template:ColorBracket" article on FFXIclopedia and is licensed under the CC-BY-SA License.