Template:Colour: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Added documentation template, template category)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|<span style="color: {{{1}}};">{{{2}}}</span>|{{{2}}}}}</includeonly><noinclude>
<includeonly>{{#if: {{{1|}}} | <span style="color: {{{1}}};">{{trim | {{{2}}} }}</span> | {{{2}}} }}</includeonly><noinclude>{{Documentation|content=
Usage: {{code|<nowiki>{{color|limegreen|Text goes here.}}</nowiki>}}
A simple template to add colour to a line of text.


Result: {{color|limegreen|Text goes here.}}
== 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>{{color|#00ff00|Text goes here.}}</nowiki>}}
}}
 
[[Category:Templates]]
Result: {{color|#00ff00|Text goes here.}}
 
Usage: {{code|<nowiki>{{color||Text goes here.}}</nowiki>}}
 
Result: {{color||Text goes here.}}
</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.