Difference between revisions of "Template:Colorshow"

From Nookipedia, the Animal Crossing wiki
m (Protected "Template:Colorshow": High traffic page: High visibility template (1000+ pages), unlikely to need changes and has potential to break much of the site if broken ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(Adding class for future use, as well as documentation template)
 
Line 1: Line 1:
<span style="color:{{#ifeq:{{{hex|}}}|false||#}}{{{1}}};">{{{2}}}</span><noinclude>[[Category:Templates]]</noinclude>
+
<span class="darkmodeinvert" style="color:{{#ifeq:{{{hex|}}}|false||#}}{{{1}}};">{{{2}}}</span><noinclude>
 +
{{Clear}}
 +
{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 08:13, May 19, 2024

{{{2}}}

Template documentation (view)


Usage

{{Colorshow|<HTML color value>|<Text>}}

This template allows for text to be recoloured using an HTML Hex color value. The first parameter should contain the Hex code of the desired color, but omit the leading hash symbol. The second parameter is used to set the text to be displayed.

Examples

{{Colorshow|ff0000|This text is red.}}

This text is red.

This template can be used to override a link colour by using it in the text display part of piped link, as seen in the example below.

[[Main page|{{Colorshow|3cb371|This link to the main page is green.}}]]
This link to the main page is green.