Template:ColorScheme: Difference between revisions
From Inkipedia, the Splatoon wiki
(add named aliases for 1 and 2) |
(add documentation) |
||
Line 10: | Line 10: | ||
|#default = black | |#default = black | ||
}} | }} | ||
|" | |"contentbackground" = rgba({{SiteColor|{{{scheme|{{{1|}}}}}}}}, 0.2) | ||
}}</includeonly><noinclude>__NOTOC__ | }}</includeonly><noinclude>__NOTOC__ | ||
== The | == Arguments == | ||
* | This template takes 2 arguments: | ||
* | |||
* <code>scheme</code>: The color scheme to pick a color from. | |||
* <code>color</code>: The color to apply. Optional; when specified, this should be one of the following: | |||
** <code>themeColor</code>: The main color of the color scheme. | |||
** <code>textColor</code>: The color to use for text set against a background of the main color. | |||
** <code>contentBackground</code>: The background color for the content of a [[Template:Navbox|navbox]], etc. | |||
* When <code>color</code> is blank or is otherwise none of the above, this template expands to <code>themeColor</code>. | |||
== Example == | |||
<pre><nowiki> | |||
<span style="background-color: {{ColorScheme|Splatoon 2}}; color: {{ColorScheme|Splatoon 2|textColor}}; border-radius: 5px; display: inline-block; padding: 0px 5px 0px 5px;">It works!</span> | |||
</nowiki></pre> | |||
<span style="background-color:{{User:Makendo/Sandbox/ColorScheme|Splatoon 2}}; color:{{User:Makendo/Sandbox/ColorScheme|Splatoon 2|textColor}}; border-radius:5px; display:inline-block; padding: 0px 5px 0px 5px;">It works!</span> | |||
</noinclude> | </noinclude> |
Revision as of 11:07, 16 November 2022
Arguments
This template takes 2 arguments:
scheme
: The color scheme to pick a color from.color
: The color to apply. Optional; when specified, this should be one of the following:themeColor
: The main color of the color scheme.textColor
: The color to use for text set against a background of the main color.contentBackground
: The background color for the content of a navbox, etc.
- When
color
is blank or is otherwise none of the above, this template expands tothemeColor
.
Example
<span style="background-color: {{ColorScheme|Splatoon 2}}; color: {{ColorScheme|Splatoon 2|textColor}}; border-radius: 5px; display: inline-block; padding: 0px 5px 0px 5px;">It works!</span>
It works!