Difference between revisions of "Template:Color"

From Nookipedia, the Animal Crossing wiki
m
(adding optional link parameter to link to relevant lists of furniture)
Line 40: Line 40:
 
| Colorful = linear-gradient(to right, #ff9999,#adebad {{#if:{{{small|}}}|50|40}}%, #adebad, #adebad {{#if:{{{small|}}}|50|60}}%, #9999ff)
 
| Colorful = linear-gradient(to right, #ff9999,#adebad {{#if:{{{small|}}}|50|40}}%, #adebad, #adebad {{#if:{{{small|}}}|50|60}}%, #9999ff)
 
| #default= #e6e6e6
 
| #default= #e6e6e6
}}; {{roundy|{{{roundy|9px}}}}}; {{#if:{{{display|}}}|display:{{{display|inline-block}}};}} text-align:center; padding:3px; margin:{{{margin|3px}}}; {{#if:{{{small|}}}|width:{{{width|5px}}}; line-height:{{{height|5px}}}; display:inline-block; {{#switch:{{{1|}}}|white|White= border:1px solid #ccc;}}">&nbsp;</div><div style="display:inline-block;"><small>{{{1|N/A}}}</small></div>| width:{{{width|4.5em}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}}"><small>{{{1|N/A}}}</small></div>}}<noinclude>
+
}}; {{roundy|{{{roundy|9px}}}}}; {{#if:{{{display|}}}|display:{{{display|inline-block}}};}} text-align:center; padding:3px; margin:{{{margin|3px}}}; {{#if:{{{small|}}}|width:{{{width|5px}}}; line-height:{{{height|5px}}}; display:inline-block; {{#switch:{{{1|}}}|white|White= border:1px solid #ccc;}}">&nbsp;</div><div style="display:inline-block;"><small>{{{1|N/A}}}</small></div>| width:{{{width|4.5em}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}}"><small>{{#switch:{{{Link|}}}| Yes =
 +
{{#switch:{{{1|}}}
 +
| Red      = [[List of red furniture items|<span style="color:black">Red</span>]]
 +
| Orange    = [[List of orange furniture items|<span style="color:black">Orange</span>]]
 +
| Yellow    = [[List of yellow furniture items|<span style="color:black">Yellow</span>]]
 +
| Green    = [[List of green furniture items|<span style="color:black">Green</span>]]
 +
| Aqua      = [[List of aqua furniture items|<span style="color:black">Aqua</span>]]
 +
| Blue      = [[List of blue furniture items|<span style="color:black">Blue</span>]]
 +
| Purple    = [[List of purple furniture items|<span style="color:black">Purple</span>]]
 +
| Pink      = [[List of pink furniture items|<span style="color:black">Pink</span>]]
 +
| Beige    = [[List of beige furniture items|<span style="color:black">Beige</span>]]
 +
| Brown    = [[List of brown furniture items|<span style="color:black">Brown</span>]]
 +
| Gray      = [[List of gray furniture items|<span style="color:black">Gray</span>]]
 +
| White    = [[List of white furniture items|<span style="color:black">White</span>]]
 +
| Black    = [[List of black furniture items|<span style="color:black">Black</span>]]
 +
| Colorful  = [[List of colorful furniture items|<span style="color:black">Colorful</span>]]
 +
}}|#default = {{{1|N/A}}} }}</small></div>}}<noinclude>
  
 
==Usage==
 
==Usage==

Revision as of 07:35, July 5, 2020

N/A

Usage

{{Color|<color>|height=<optional>|width=<optional>|margin=<optional>|display=<optional>|roundy=<optional>|small=<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 'N/A'. Setting any value for small will result in the colored box being placed to the left of the text rather than enveloping it.

 Supported Colors
Red
Green
Blue
Yellow
Orange
Pink
Purple
L. Blue
Beige
Brown
Gray
White
Colorful
Black
Default