Template:Colour: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "<includeonly><span style="color: {{#if:{{{1|}}}|{{{1}}}|red}};">{{{2}}}</span></includeonly><noinclude> Use it like this: {{C|<nowiki>{{color|green|Text goes here.}}</nowiki>}} </noinclude>")
 
(Added documentation template, template category)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span style="color: {{#if:{{{1|}}}|{{{1}}}|red}};">{{{2}}}</span></includeonly><noinclude>
<includeonly>{{#if: {{{1|}}} | <span style="color: {{{1}}};">{{trim | {{{2}}} }}</span> | {{{2}}} }}</includeonly><noinclude>{{Documentation|content=
Use it like this:
A simple template to add colour to a line of text.


{{C|<nowiki>{{color|green|Text goes here.}}</nowiki>}}
== 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>
}}
 
}}
[[Category:Templates]]
</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.