قالب:Infobox album/color
| This template is used on many pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page قبل تنفيذهم. |
Important
When modifying this template, don't forget to update Template:Infobox album/link.
Usage
This is an auxiliary template used by the {{Infobox album}} template, as well as other templates used in it and {{Infobox song}}'s |misc= parameter: {{Singles}}, {{Extra album cover}}, {{Extra chronology}}, {{Extra track listing}}, {{External music video}} and {{Audio sample}}. It should never be used on its own. The first parameter should be one of the codes from the table below, representing a type of album (parameter "Type"). The template returns the color that will be used.
Quick reference table
| Code | Color | Display |
|---|---|---|
| studio | lightsteelblue | studio by artist |
| demo | lightsteelblue | demo by artist |
| EP | #F4BF92 | EP by artist |
| single album | #F4BF92 | single album by artist |
| live | burlywood | live by artist |
| greatest | #BFE0BF | greatest by artist |
| remix | #BFE0BF | remix by artist |
| box | #BFE0BF | box by artist |
| compilation | #BFE0BF | compilation by artist |
| mixtape | #BFE0BF | mixtape by artist |
| soundtrack | gainsboro | soundtrack by artist |
| film | gainsboro | film by artist |
| cast | gainsboro | cast by artist |
| video | #99CCFF | video by artist |
| other | peachpuff | other by artist |
Unit test
If at any time the Expected and Obtained columns do not match, this template can be considered broken. This table makes the template automatically check itself. If a
mark is seen, it means that self test worked fine. If there is a
mark, it means the test failed. Whenever you make a modification to the template, please save the page, hit CTRL+F5, and check if all the self tests have passed. If you add a new type to the template, remember to add the type using this format:
| <nowiki>typename</nowiki>
| typecolor
| {{Template:Infobox album/color|typename}}
| {{#ifeq:{{Template:Infobox album/color|typename}}|typecolor|{{y}}|{{n}}}}
Replace typename with the new type name (in example, Epic soundtrack), and typecolor with the color assigned to the type (in example, brown). See Wikipedia:Colours and Wikipedia:Infobox colours for additional information.
Note: Sometimes the test may pass while previewing the page, but once saved the test would fail, no matter how many times the cache is cleared. In this case, please click this link to purge the cache. If that doesn't solve the problem, please post a note in the Talk page of the template and an editor will review the changes.
TemplateData
See the monthly error report for this template.
TemplateData for Infobox album
Colour selection template for {{Infobox album}} and associated templates.
| وسيط | وصف | نوع | حالة | |
|---|---|---|---|---|
| Type | 1 | Type of recording | نص | مطلوب |
| Testing only | 2 | Custom colour value. Not necessary in almost all cases | غير معروف | مستغنى عنه |
See also
| The above documentation is transcluded from قالب:Infobox album/color/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |