Template:Colour: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (Willowisp moved page Template:Color to Template:Colour)
(Added documentation template, template category)
 
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}} | <span style="color: {{{1}}};">{{trim | {{{2}}} }}</span> | {{{2}}} }}</includeonly><noinclude>
<includeonly>{{#if: {{{1|}}} | <span style="color: {{{1}}};">{{trim | {{{2}}} }}</span> | {{{2}}} }}</includeonly><noinclude>{{Documentation|content=
Usage: {{code|<nowiki>Blah. {{color|limegreen|Text goes here.}} Blub.</nowiki>}}
A simple template to add colour to a line of text.


Result: Blah. {{color|limegreen|Text goes here.}} Blah.
== Examples ==
{{Template demo
| style = table
| <nowiki>Blah. {{color|limegreen|Text goes here.}} Blub.</nowiki>
| <nowiki>Blah. {{color|#00ff00|Text goes here.}} Blah.</nowiki>
| <nowiki>Blah. {{color||Text goes here.}} Blah.</nowiki>
}}


Usage: {{code|<nowiki>Blah. {{color|#00ff00|Text goes here.}} Blah.</nowiki>}}
}}
 
[[Category:Templates]]
Result: Blah. {{color|#00ff00|Text goes here.}} Blah.
 
Usage: {{code|<nowiki>Blah. {{color||Text goes here.}} Blah.</nowiki>}}
 
Result: Blah. {{color||Text goes here.}} Blah.
</noinclude>
</noinclude>

Latest revision as of 10:06, 19 January 2025

Template documentation

A simple template to add colour to a line of text.

Examples

Markup Renders as
Blah. {{color|limegreen|Text goes here.}} Blub.
Blah. Text goes here. Blub.
Blah. {{color|#00ff00|Text goes here.}} Blah.
Blah. Text goes here. Blah.
Blah. {{color||Text goes here.}} Blah.
Blah. Text goes here. Blah.