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


Colors

A simple template that returns a div with span(s) of color(s) separated by " / ".

Possible arguments for the template are:

  • Colors or 1 (does the same thing)
  • Customs or 2 (does the same thing)

Colors can have "all" as argument:
{{Colors|All}}

{{#vardefine: Colors | All }} {{#vardefine: Customs | }}

{{#Var:Colors}}


Colors can also have a specifict color:
{{Colors|Red}}

{{#vardefine: Colors | Red }} {{#vardefine: Customs | }}

{{#Var:Colors}}


Colors can also have Colors separated by commas:
{{Colors|Red, Blue, Purple}}

{{#vardefine: Colors | Red, Blue, Purple }} {{#vardefine: Customs | }}

{{#Var:Colors}}


Customs need a specifict structure, (name_displayed, color, index).
{{Colors|Customs=(red, red, 1),(blue, green, 2)}}

{{#vardefine: Colors | }} {{#vardefine: Customs | (red, red, 1),(blue, green, 2) }}

{{#Var:Colors}}


Using Customs, you can insert custom colors in between normal ones using the third parameter (the index).
{{Colors|pink, purple|Customs=(red, red, 1),(blue, green, 5),(yellow, orange, 3)}}

{{#vardefine: Colors | pink, purple }} {{#vardefine: Customs | (red, red, 1),(blue, green, 5),(yellow, orange, 3) }}

{{#Var:Colors}}


Custom colors don't need an index, the third parameter is optional so it could look like this: (name_displayed, color).
Please note that Custom colors that don't have index will be added at the end in the order they were entered.
The color can be the color name or its HEX code Google color picker.
{{Colors|pink, purple|Customs=(red, #c5d918, 1),(test2, orange)}}

{{#vardefine: Colors | pink, purple }} {{#vardefine: Customs | (red, #c5d918, 1),(test2, orange) }}

{{#Var:Colors}}


Lastly, you can use a combination of the all keyword and custom, but do note that all adds 12 colors in the same way as if you had entered them all in the Colors argument.
{{Colors|All|Customs=(red, #c5d918, 2),(test2, orange)}}

{{#vardefine: Colors | All }} {{#vardefine: Customs | (red, #c5d918, 2),(test2, orange) }}

{{#Var:Colors}}


Contents