Jump to content

Template:Font color: Difference between revisions

From Ash's Lecture Notes
Ash (talk | contribs)
Add font color template
 
Ash (talk | contribs)
Correct template parsing and named parameters
 
Line 1: Line 1:
<includeonly><span style="color: {{{fg|{{{1|inherit}}}}}}; background-color: {{{bg|{{#if:{{{3|}}}|{{{2|transparent}}}|transparent}}}}};">{{{text|{{#if:{{{3|}}}|{{{3}}}|{{{2|}}}}}}}}</span></includeonly><noinclude>Use <code><nowiki>{{Font color|red|coloured text}}</nowiki></code> or <code><nowiki>{{Font color|white|blue|text with a background}}</nowiki></code>. For equations containing equals signs, use <code><nowiki>{{Font color|fg=red|text=$E=mc^2$}}</nowiki></code>.</noinclude>
<includeonly><span style="color: {{{fg|{{{1|inherit}}}}}}; background-color: {{{bg|transparent}}};">{{{text|{{{3|{{{2|}}}}}}}}}</span></includeonly><noinclude>Use <code><nowiki>{{Font color|red|coloured text}}</nowiki></code>. For a background or equations, use named arguments such as <code><nowiki>{{Font color|fg=white|bg=blue|text=$E=mc^2$}}</nowiki></code>.</noinclude>

Latest revision as of 09:19, 29 September 2026

Use {{Font color|red|coloured text}}. For a background or equations, use named arguments such as {{Font color|fg=white|bg=blue|text=$E=mc^2$}}.