Difference between revisions of "Template:Color"

From Nookipedia, the Animal Crossing wiki
(Restore margin)
(Only showing text when verbose param is defined)
Line 1: Line 1:
<div style="background:{{#switch:{{{1|}}}
+
<div aria-label="{{{1|Unknown}}}" style="background:{{#switch:{{{1|}}}
 
| red
 
| red
 
| Red = #ffaa9a
 
| Red = #ffaa9a
Line 40: Line 40:
 
| Colorful = linear-gradient(to right, #ff9999,#adebad 40%, #adebad, #adebad 60%, #9999ff)
 
| Colorful = linear-gradient(to right, #ff9999,#adebad 40%, #adebad, #adebad 60%, #9999ff)
 
| #default= #e6e6e6
 
| #default= #e6e6e6
}}; {{roundy|{{{roundy|9px}}}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}} {{#if:{{{display|}}}|display:{{{display|}}};}} text-align:center; padding:3px; margin:3px; width:{{{width|4.5em}}};"><small>{{{1|Unknown}}}</small></div><noinclude>
+
}}; {{roundy|{{{roundy|9px}}}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}} {{#if:{{{display|}}}|display:{{{display|}}};}} text-align:center; padding:3px; margin:3px; width:{{{width|4.5em}}};"><small>{{#if:{{{verbose|}}}|{{{1|Unknown}}}|}}</small></div><noinclude>
  
 
==Usage==
 
==Usage==

Revision as of 06:46, April 17, 2020

Usage

{{Color|<color>|height=<optional>|width=<optional>|display=<optional>|roundy=<optional>}}

Creates a div with a background of a given color, with a color name centered inside. If no value is entered, default color is used and box displays 'Unknown'.

 Supported Colors