Template:SiteColor: Difference between revisions

From Inkipedia, the Splatoon wiki
m (It makes more sense as just the color triplet)
(making into module invocation (stand back, I'm trying science))
Tag: Replaced
 
(30 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: "{{{1|}}}"
<includeonly>{{#invoke:SiteColor|main}}</includeonly><noinclude>
|"Splatoon"  = 170, 220, 0
Template invocation of [[Module:SiteColor]].
|"Splatoon 2" = 240, 60, 120
|#default    = 196, 196, 196
}}</includeonly><noinclude>
__NOTOC__
Produces an RGB triplet color value using Inkipedia site colors.


=== Usage ===
{{:Module:SiteColor/doc}}
<nowiki>{{</nowiki>SiteColor|''theme''}}
==== Parameters ====
''theme'' - The theme ID for the color to use. Must be one of the following:
*{{Ink|custom|16|rgb(170, 220, 0)}} "Splatoon"
*{{Ink|custom|16|rgb(240, 60, 120)}} "Splatoon 2"
*{{Ink|custom|16|rgb(196, 196, 196)}} ''Any other value''
 
=== Example ===
==== Markup ====
<nowiki><span style="color: rgb({{SiteColor|Splatoon 2|0.5}});">Sample text</span></nowiki>
 
==== Output ====
<span style="color: rgb({{User:GuyPerfect/SiteColor|Splatoon 2}});">Sample text</span>
</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:
  •   Generic
  •   Octo Expansion
  •   Salmon Run
  •   Side Order
  •   NIWA
  •   Splatoon
  •   Splatoon 2
  •   Splatoon 3
  •   Any other value, including unspecified

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