Difference between revisions of "Template:Color Icons"

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

Revision as of 10:59, 19 February 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