Template:ExplodeColors: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
Line 42: Line 42:


-->{{#if: {{#var:_character_two_}}
-->{{#if: {{#var:_character_two_}}
| {{#var:_output_one_}}, {{#var:_output_two_}}
| {{#if: {{{firstonly|}}}
  | {{#var:_output_one_}}
  | {{#var:_output_one_}}, {{#var:_output_two_}}
  }}
| {{#var:_output_one_}}
| {{#var:_output_one_}}
}}<!--
}}<!--
Line 53: Line 56:


Output: {{qud text|{{ExplodeColors|rC}}}}
Output: {{qud text|{{ExplodeColors|rC}}}}
Also accepts a <code>firstonly</code> parameter to only return the first color, if desired.


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 02:17, 18 December 2020


Explodes a 1 - 2 character string of color codes into full color names.

Example: {{ExplodeColors|rC}}

Output: dark red, cyan

Also accepts a firstonly parameter to only return the first color, if desired.