Difference between revisions of "Template:SiteColor"

From WikiMe @ iroiro.io
Jump to: navigation, search
ink>GuyPerfect
m (Removing TOC)
m (23 revisions imported)
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly>rgb{{#if:{{{2|}}}|a}}({{#switch: "{{{1|}}}"
+
<includeonly>{{#switch: "{{{1|}}}"
|"Splatoon"   = 170, 220, 0
+
|"Generic"        = 0, 153, 255    <!-- #0099FF -->
|"Splatoon 2" = 240, 60, 120
+
|"NIWA"           = 255, 128, 0    <!-- #FF8000 -->
|#default     = 196, 196, 196
+
|"Splatoon"       = 170, 220, 0     <!-- #AADC00 -->
}}{{#if:{{{2|}}}|, {{{2}}}}})</includeonly><noinclude>
+
|"Splatoon 2"     = 240, 60, 120   <!-- #F03C78 -->
__NOTOC__
+
|"Octo Expansion" = 174, 21, 102    <!-- #AE1566 -->
Produces a CSS color value using Inkipedia site colors.
+
|#default         = 192, 192, 192  <!-- #C0C0C0 -->
 +
}}</includeonly><noinclude>__NOTOC__
 +
Produces an RGB triplet color value using Inkipedia site colors.
  
=== Usage ===
+
=== Parameters ===
<nowiki>{{</nowiki>SiteColor|''theme''[|''alpha'']}}
+
{|
==== Parameters ====
+
|- style="vertical-align: top;"
''theme'' - The theme ID for the color to use. Must be one of the following:
+
|<code>theme</code>||Unnamed.
*{{Ink|custom|16|rgb(170, 220, 0)}} "Splatoon"
+
|The theme ID for the color to use. Must be one of the following:
*{{Ink|custom|16|rgb(240, 60, 120)}} "Splatoon 2"
+
*{{Ink|custom|1|rgb({{SiteColor|Generic}})}} Generic
*{{Ink|custom|16|rgb(196, 196, 196)}} ''Any other value''
+
*{{Ink|custom|1|rgb({{SiteColor|Splatoon}})}} Splatoon
''alpha'' - If present, a number in the range [0.0, 1.0] representing the opacity of the color. If absent, a fully-opaque color is produced.
+
*{{Ink|custom|1|rgb({{SiteColor|Splatoon 2}})}} Splatoon 2
 +
*{{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 ===
 
=== Example ===
 
==== Markup ====
 
==== Markup ====
  <nowiki><span style="color: {{SiteColor|Splatoon 2|0.5}};">Sample text</span></nowiki>
+
  <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 ====
 
==== Output ====
<span style="color: {{User:GuyPerfect/SiteColor|Splatoon 2|0.5}};">Sample text</span>
+
<span style="color: rgb({{SiteColor|Splatoon 2}});">Sample text</span>
 
</noinclude>
 
</noinclude>

Latest revision as of 22:26, 17 May 2019

Produces an RGB triplet color value using Inkipedia site colors.

Parameters[edit]

theme Unnamed. The theme ID for the color to use. Must be one of the following:
  •   Generic
  •   Splatoon
  •   Splatoon 2
  •   Octo Expansion
  •   NIWA
  •   Any other value

Example[edit]

Markup[edit]

<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[edit]

Sample text