Template:FontCol

Revision as of 15:30, 7 May 2025 by Iritscen (talk | contribs) (Created page with "<includeonly><span style="color:{{{1|gray}}};">{{{2}}}</span></includeonly><noinclude> A shortcut for creating a span of text with a custom color, which otherwise would require typing:<br> <code><nowiki><span style="color:blue;"></nowiki>''something''<nowiki></span></nowiki></code> To use this template, pass the color of the text as parameter 1 and the text to use as parameter 2, like so: <code><nowiki>{{FontCol|blue|Here's some blue text.}}</nowiki></code> …which y...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A shortcut for creating a span of text with a custom color, which otherwise would require typing:
<span style="color:blue;">something</span>

To use this template, pass the color of the text as parameter 1 and the text to use as parameter 2, like so:

{{FontCol|blue|Here's some blue text.}}

…which yields:

Here's some blue text.

Colors can be passed in one of three formats:

  • Pick one of the 140 named HTML colors.
  • Create one with the rgb() command (e.g. "rgb(72, 255, 72)").
  • Specify one in hex (e.g. "#FF00AA").