Template:FontColor: Difference between revisions
From Atomix
mNo edit summary |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
}} | }} | ||
</pre> | </pre> | ||
You must specify the fonts using names (yellow,red) or [https://meta.wikimedia.org/wiki/Help:Text_color hexadecimal form]. Note that background (bg) or foreground (fg) can be left empty. | |||
For example, <nowiki>{{FontColor|fg=white|bg=purple|text=this is white text on purple background}}</nowiki> yields {{FontColor|fg=white|bg=purple|text=this is white text on purple background}}. | |||
Edit the page to see the template text. | |||
</noinclude><includeonly><span style="color:{{{fg|}}}; background:{{{bg|}}}">{{{text|}}}</span></includeonly> | |||
<span style="color:{{{fg|}}}; background:{{{bg|}}}">{{{text|}}}</span> | |||
</includeonly> |
Latest revision as of 00:53, 17 December 2021
This is the "FontColor" template. It should be called in the following format:
{{FontColor |fg= |bg= |text= }}
You must specify the fonts using names (yellow,red) or hexadecimal form. Note that background (bg) or foreground (fg) can be left empty.
For example, {{FontColor|fg=white|bg=purple|text=this is white text on purple background}} yields this is white text on purple background.
Edit the page to see the template text.