Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Color: Difference between revisions

Template page
Xhamon (talk | contribs)
New features: Text color. Inline usage.
Tags: Reverted 2017 source edit
Xhamon (talk | contribs)
Documentation bugfix.
Tag: 2017 source edit
 
(2 intermediate revisions by the same user not shown)
Line 16: Line 16:
This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.)
This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.)


Syntax: {{color|txt=purple|<nowiki>{{color|bg=<BackgroundColor>|txt=<TextColor>|format=?|<Content>}}</nowiki>}}<br>
Syntax: {{color|txt=purple|<nowiki>{{color|bg=<BackgroundColor>|txt=<TextColor>|format=<?>|<Content>}}</nowiki>}}<br>
If {{color|txt=purple|<nowiki><BackgroundColor></nowiki>}} and {{color|txt=purple|<nowiki><TextColor></nowiki>}} are both empty, ie: {{color|txt=purple|<nowiki>{{color|<Content>}}</nowiki>}}, this template is ignored and will return {{color|txt=purple|<nowiki><Content></nowiki>}} as is.<br>
If {{color|txt=purple|<nowiki><BackgroundColor></nowiki>}} and {{color|txt=purple|<nowiki><TextColor></nowiki>}} are both empty, ie: {{color|txt=purple|<nowiki>{{color|<Content>}}</nowiki>}}, this template is ignored and will return {{color|txt=purple|<nowiki><Content></nowiki>}} as is.<br>
If {{color|txt=purple|format=li}}, if there is a background, the style of the box is adjusted to look better in lists. If the format is something else (or omitted), the box is made to be used inside paragraphs of text.
If {{color|txt=purple|<nowiki>format=li</nowiki>}} and there is a background, the style of the box is adjusted to look better in lists. If the format is something else (or omitted), the box is made to be used inside paragraphs of text.

Latest revision as of 03:39, 7 October 2022


This template puts text inside a box of a specified background color, or changes the color of text, or both. Background color is most useful for indicating in which area of the game something is.
This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.)

Syntax: {{color|bg=<BackgroundColor>|txt=<TextColor>|format=<?>|<Content>}}
If <BackgroundColor> and <TextColor> are both empty, ie: {{color|<Content>}}, this template is ignored and will return <Content> as is.
If format=li and there is a background, the style of the box is adjusted to look better in lists. If the format is something else (or omitted), the box is made to be used inside paragraphs of text.