Template:SiteColor: Difference between revisions
From Inkipedia, the Splatoon wiki
m (→Output: cat change) |
mNo edit summary |
||
Line 33: | Line 33: | ||
==== Output ==== | ==== Output ==== | ||
<span style="color: rgb({{SiteColor|Splatoon 2}});">Sample text</span> | <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]] | [[Category:Formatting templates]] | ||
</noinclude> | </noinclude> |
Revision as of 03:26, 30 January 2023
Produces an RGB triplet color value using Inkipedia site colors.
Parameters
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 from Template:SiteColor/styles.css.
<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>
Page Template:SiteColor/styles.css has no content.
Sample Generic Text
Sample NIWA Text
Sample S Text