Template:Color: Difference between revisions
More actions
New features: Text color. Inline usage. Tags: Reverted 2017 source edit |
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 {{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.