Template:SiteColor: Difference between revisions

From Inkipedia, the Splatoon wiki
(Undo revision 452596 by Splatunie (talk) These colours are not bright enough. The previous ones are more colourful)
Tag: Undo
(making into module invocation (stand back, I'm trying science))
Tag: Replaced
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: "{{{1|}}}"
<includeonly>{{#invoke:SiteColor|main}}</includeonly><noinclude>
|"Generic"        = 0, 153, 255    <!-- #0099FF -->
Template invocation of [[Module:SiteColor]].
|"NIWA"          = 255, 128, 0    <!-- #FF8000 -->
|"Splatoon"      = 170, 220, 0    <!-- #AADC00 -->
|"Splatoon 2"    = 240, 60, 120    <!-- #F03C78 -->
|"Splatoon 3"    = 235, 238, 61    <!-- #EBEE3D -->
|"Octo Expansion" = 174, 21, 102    <!-- #AE1566 -->
|#default        = 192, 192, 192  <!-- #C0C0C0 -->
}}</includeonly><noinclude>__NOTOC__
Produces an RGB triplet color value using Inkipedia site colors.


=== Parameters ===
{{:Module:SiteColor/doc}}
{|
|- style="vertical-align: top;"
|<code>theme</code>||Unnamed.
|The theme ID for the color to use. Must be one of the following:
*{{Ink|custom|1|rgb({{SiteColor|Generic}})}} Generic
*{{Ink|custom|1|rgb({{SiteColor|Splatoon}})}} {{S}}
*{{Ink|custom|1|rgb({{SiteColor|Splatoon 2}})}} {{S2}}
*{{Ink|custom|1|rgb({{SiteColor|Splatoon 3}})}} {{S3}}
*{{Ink|custom|1|rgb({{SiteColor|Octo Expansion}})}} Octo Expansion
*{{Ink|custom|1|rgb({{SiteColor|NIWA}})}} NIWA
*{{Ink|custom|1|rgb({{SiteColor}})}} ''Any other value''
|}
 
=== Example ===
==== Markup ====
<nowiki><span style="color: rgb({{SiteColor|Splatoon 2}});">Sample text</span></nowiki>
 
For use in templates with an optional color parameter:
<nowiki>style=" background:rgb({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}); "</nowiki>
 
==== Output ====
<span style="color: rgb({{SiteColor|Splatoon 2}});">Sample text</span>
 
 
=== Class Example ===
You may also use Site Color's defined classes directly from [[Template:SiteColor/styles.css]].
<pre>
<templatestyles src="Template:SiteColor/styles.css" />
<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>
</pre>
 
<templatestyles src="Template:SiteColor/styles.css"/>
<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>
 
[[Category:Formatting templates]]
</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