Template:Color: Difference between revisions
From HorizonXI Wiki
(Created page with "<font color="{{#switch:{{lc:{{{1}}}}} |beige = #cc9900 |light blue = #33ccff |fire = red |earth = #cc9900 |water = blue |wind = green |ice = #33CCFF |lightning = purple |light = gray |dark = black |nm = red |positive = green |negative = red |neutral = #cc9900 |#default = {{lc:{{{1}}}}} }}">{{#switch:{{lc:{{{style|}}}}} |normal = {{{2}}} |bold = '''{{{2}}}''' |italic = ''{{{2}}}'' |bold-italic = '''''{{{2}}}''''' |'''{{{2}}}''' }}</font><noinclude> Category:Templates|{...") Tag: visualeditor-wikitext |
(replaced explicit element colors through their css classes) |
||
| Line 1: | Line 1: | ||
< | <span {{#switch:{{lc:{{{1}}}}} | ||
| | | earth = class="earth-color" | ||
| | | water = class="water-color" | ||
|fire = | | wind = class="wind-color" | ||
| | | fire = class="fire-color" | ||
| | | ice = class="ice-color" | ||
| | | lightning = class="lightning-color" | ||
| | | light = class="light-color" | ||
| | | dark = class="dark-color" | ||
|light = | | beige = style="color: #cc9900" | ||
| light blue = style="color: #33ccff" | |||
|nm = red | | nm = style="color: red" | ||
|positive = green | | positive = style="color: green" | ||
|negative = red | | negative = style="color: red" | ||
|neutral = #cc9900 | | neutral = style="color: #cc9900" | ||
|#default = {{lc:{{{1}}}}} | | #default = style="color: {{lc:{{{1}}}}}" | ||
}} | }}>{{#switch:{{lc:{{{style|}}}}} | ||
|normal = {{{2}}} | | normal = {{{2}}} | ||
|bold = '''{{{2}}}''' | | bold = '''{{{2}}}''' | ||
|italic = ''{{{2}}}'' | | italic = ''{{{2}}}'' | ||
|bold-italic = '''''{{{2}}}''''' | | bold-italic = '''''{{{2}}}''''' | ||
|'''{{{2}}}''' | | '''{{{2}}}''' | ||
}}</ | }}</span><noinclude> | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
==Usage== | ==Usage== | ||
| Line 32: | Line 32: | ||
</pre> | </pre> | ||
Any color may be used, but there are several predefined colors included for convenience: | Any color may be used, but there are several predefined colors included for convenience: | ||
{| | {| class="table-xs" | ||
!align="left"| Color | ! align="left" | Color | ||
!align="left"| Result | ! align="left" | Result | ||
|- | |- | ||
| Beige || {{Color|beige|XXX}} | | Beige || {{Color|beige|XXX}} | ||
| Line 50: | Line 50: | ||
In addition, all the elemental colors that are used for each crystal are in the template, (i.e. {{[[Template:Fire|{{Fire}}]]}}). However, this template is not actually to be used on any crystal or element references, but only for if you want to mimic the color in other places. | In addition, all the elemental colors that are used for each crystal are in the template, (i.e. {{[[Template:Fire|{{Fire}}]]}}). However, this template is not actually to be used on any crystal or element references, but only for if you want to mimic the color in other places. | ||
{| | {| class="table-xs" | ||
!align="left"| Color | ! align="left" | Color | ||
!align="left"| Result | ! align="left" | Result | ||
|- | |- | ||
| | | Earth || {{Color|earth|XXX}} | ||
|- | |- | ||
| Water || {{Color|water|XXX}} | | Water || {{Color|water|XXX}} | ||
|- | |- | ||
| | | Wind || {{Color|wind|XXX}} | ||
|- | |- | ||
| | | Fire || {{Color|fire|XXX}} | ||
|- | |- | ||
| | | Ice || {{Color|ice|XXX}} | ||
|- | |- | ||
| | | Lightning || {{Color|lightning|XXX}} | ||
|- | |- | ||
| | | Light || {{Color|light|XXX}} | ||
|- | |- | ||
| | | Dark || {{Color|dark|XXX}} | ||
|} | |} | ||
Latest revision as of 22:19, 16 November 2023
{{{2}}}
Usage
{{Color|color|text}}
Style can be set to either normal, bold, italic, or bold-italic by declaring the style variable (the default is bold).
{{Color|style=normal|color|text}}
Any color may be used, but there are several predefined colors included for convenience:
| Color | Result |
|---|---|
| Beige | XXX |
| Light Blue | XXX |
| NM | XXX |
| Positive | XXX |
| Negative | XXX |
| Neutral | XXX |
In addition, all the elemental colors that are used for each crystal are in the template, (i.e. {{Fire}}). However, this template is not actually to be used on any crystal or element references, but only for if you want to mimic the color in other places.
| Color | Result |
|---|---|
| Earth | XXX |
| Water | XXX |
| Wind | XXX |
| Fire | XXX |
| Ice | XXX |
| Lightning | XXX |
| Light | XXX |
| Dark | XXX |
Be very mindful of using this template, users with custom themes may not be able to read text with hard-coded colors if an appropriate background color is not also defined.
See Also
- Template:Colorlink - a template used to make colored links.
