Template:ColorScheme: Difference between revisions
From Inkipedia, the Splatoon wiki
m (remove userspace references) |
GloverMist (talk | contribs) (Changed text colours for better readability per WebAIM contrast standards, added SO) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
|#default = rgb({{SiteColor|{{{scheme|{{{1|}}}}}}}}) | |#default = rgb({{SiteColor|{{{scheme|{{{1|}}}}}}}}) | ||
|"textcolor" = {{#switch: "{{{scheme|{{{1|}}}}}}" | |"textcolor" = {{#switch: "{{{scheme|{{{1|}}}}}}" | ||
|"Generic" = | |"Generic" = black | ||
|"NIWA" = | |"NIWA" = black | ||
|"Splatoon" = black | |"Splatoon" = black | ||
|"Splatoon 2" = white | |"Splatoon 2" = black | ||
|"Octo Expansion" = white | |||
|"Splatoon 3" = black | |"Splatoon 3" = black | ||
|" | |"Side Order" = black | ||
|#default = | |#default = inherit | ||
}} | }} | ||
|"contentbackground" = rgba({{SiteColor|{{{scheme|{{{1|}}}}}}}}, 0.2) | |"contentbackground" = rgba({{SiteColor|{{{scheme|{{{1|}}}}}}}}, 0.2) |
Latest revision as of 20:40, 9 July 2024
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 values specified, the main color of the scheme given is returned.
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!