Template:SiteColor: Difference between revisions
From Inkipedia, the Splatoon wiki
GuyPerfect (talk | contribs) (Created page with "<includeonly>rgb{{#if:{{{2|}}}|a}}({{#switch: "{{{1|}}}" |"Splatoon" = 170, 220, 0 |"Splatoon 2" = 240, 60, 120 |#default = 196, 196, 196 }}{{#if:{{{2|}}}|, {{{2}}}}})</...") |
(making into module invocation (stand back, I'm trying science)) Tag: Replaced |
||
(33 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#invoke:SiteColor|main}}</includeonly><noinclude> | ||
Template invocation of [[Module:SiteColor]]. | |||
{{:Module:SiteColor/doc}} | |||
</noinclude> | </noinclude> |
Latest revision as of 21:17, 5 September 2023
Template invocation of Module:SiteColor.
Produces an RGB triplet color value using Inkipedia site colors.
Parameters
{{SiteColor|<theme>}}
theme |
Unnamed. | The theme ID for the color to use. Must be one of the following:
|
Example
Markup
<span style="color: rgb({{SiteColor|Splatoon 2}});">Sample text</span>
For use in templates with an optional color parameter:
style=" background:rgb({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}); "
Output
Sample text
Class Example
You may also use Site Color's defined classes directly.
These are defined in MediaWiki:SiteColor.css. If this needs updating, please ask one of the interface administrators.
{| class="wikitable sitecolor-niwa" ! Column 1 ! Column 2 |+ | Example || Value |- |}
Column 1 | Column 2 |
---|---|
Example | Value |
<div class="site-color-background-generic site-color-text-generic">Sample Generic Text</div> <div class="site-color-background-shadow-niwa site-color-text-niwa">Sample NIWA Text</div> <div class="site-color-background-shadow-s site-color-text-s">Sample S Text</div>
Sample Generic Text
Sample NIWA Text
Sample S Text