Difference between revisions of "Template:Color Icons"

From mtgpq wiki
Jump to: navigation, search
Line 22: Line 22:
 
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 2|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|3|3}} }} }}<!--
 
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 2|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|3|3}} }} }}<!--
 
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 3|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|4|4}} }} }}<!--
 
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 3|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|4|4}} }} }}<!--
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 4|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|5|5}} }} }} }}<!--
+
-->{{#ifexpr:{{#invoke:String|len|{{{1}}}}} > 4|&thinsp;{{ {{#invoke:String|sub|{{{1}}}|5|5}} }} }}<!--
--></includeonly>
+
-->}}</includeonly>

Revision as of 03:14, 9 March 2019

Usage

Given a string of 1 to 5 letters representing colors, produces a corresponding series of space-separated color icons.

The template parameter is a sequence of upper-case letters from the set WUBRGCL.

Example

The following mark-up:

{{Color Icons|UBR}}

Produces:

BlueBlackRed