Difference between revisions of "Template:Element color/testcases"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>DePiep
(Replaced content with 'no tests now')
 
Line 1: Line 1:
{{Documentation subpage}}
+
no tests now
This template returns the element's legend color, to be used in HTML makeup:
 
* {{tlf|Element color|<nowiki>Alkali metals</nowiki>}} &rarr; <code>{{element color|Alkali metals}}</code>
 
* {{tlf|Element color|<nowiki>alkali metal</nowiki>}} &rarr; <code>{{element color|alkali metal}}</code>
 
==Overview==
 
 
 
===State of matter (font color)===
 
:''Font color attribute value''; different from {{tl|infobox element}} header colors
 
* {{Element color/example|Solid|attr=color}}
 
* {{Element color/example|Liquid|attr=color}}
 
* {{Element color/example|Gas|attr=color}}
 
* {{Element color/example|Unknown phase|attr=color}}
 
 
 
* {{Element color/example|Solid (predicted)|attr=color}}
 
* {{Element color/example|Liquid (predicted)|attr=color}}
 
* {{Element color/example|Gas (predicted)|attr=color}}
 
 
 
=== Occurrence (cell border; aka frame) ===
 
:''Border attribute value''
 
* {{Element color/example|Primordial|attr=border}}
 
* {{Element color/example|From decay|note="Natural radio" deprecated|attr=border}}
 
* {{Element color/example|Synthetic|attr=border}}
 
* {{Element color/example|Undiscovered|attr=border}}
 
* {{Element color/example|None|attr=border}}
 
 
 
===Metal&ndash;nonmetal categories===
 
 
 
* {{Element color/example|Alkali metal}}
 
* {{Element color/example|Alkaline earth metal}}
 
* {{Element color/example|Lanthanide}}
 
* {{Element color/example|Actinide}}
 
* {{Element color/example|Superactinide}}
 
* {{Element color/example|Eka-superactinide}}
 
* {{Element color/example|Transition metal}}
 
* {{Element color/example|Post-transition metal}}
 
* {{Element color/example|Metalloid}}
 
* {{Element color/example|Diatomic nonmetal}}
 
* {{Element color/example|Polyatomic nonmetal}}
 
* {{Element color/example|Noble gas}}
 
 
 
* {{Element color/example|Unknown chemical properties}}
 
* {{Element color/example|Unknown}}
 
 
 
===Metal&ndash;nonmetal categories, reduced set===
 
* {{Element color/example|Metals}}
 
* {{Element color/example|Metalloids}}
 
* {{Element color/example|Nonmetals}}
 
* {{Element color/example|Inner transition metals}}
 
 
 
===Year and era===
 
* {{Element color/example|Antiquity to Middle Ages}}
 
* {{Element color/example|Before 1800}}
 
* {{Element color/example|1800-1849}}
 
* {{Element color/example|1850-1899}}
 
* {{Element color/example|1900-1949}}
 
* {{Element color/example|1950-1999}}
 
* {{Element color/example|2000-present}}
 
* {{Element color/example|Future}}
 
Example: {{tl|Periodic table (discovery periods)}}
 
 
 
===Blocks===
 
* {{Element color/example|s-block}}
 
* {{Element color/example|p-block}}
 
* {{Element color/example|d-block}}
 
* {{Element color/example|f-block}}
 
* {{Element color/example|g-block|note=g-block only exists theoretically; color is not used}}
 
In period 8, theoretical elements:
 
* {{Element color/example|s-block (predicted)}}
 
* {{Element color/example|p-block (predicted)}}
 
* {{Element color/example|d-block (predicted)}}
 
* {{Element color/example|f-block (predicted)}}
 
* {{Element color/example|g-block (predicted)}}
 
 
 
===Numbers===
 
Used in: [[Valence (chemistry)#Maximum valences of the elements]]
 
These colors correspond to the [[#Alkali metal&ndash;noble gases range|Alkali metal&ndash;noble gases range]]
 
* {{Element color/example|0}}
 
* {{Element color/example|1}}
 
* {{Element color/example|2}}
 
* {{Element color/example|3}}
 
* {{Element color/example|4}}
 
* {{Element color/example|5}}
 
* {{Element color/example|6}}
 
* {{Element color/example|7}}
 
* {{Element color/example|8}}
 
* {{Element color/example|9}}
 
 
 
===Misc===
 
* {{Element color/example|Rare earth metal|note=discussed, Nov/Dec 2013}}
 
* {{Element color/example|Halogen|note=deprecated as a nonmetal category. See [[nonmetal]]}}
 
 
 
==="Unknown" variants===
 
* {{Element color/example|Unknown}}
 
* {{Element color/example|Unk}}
 
* {{Element color/example|Unknown (white)}}
 
* {{Element color/example|Unknown chemical properties}}
 
* {{Element color/example|Unknown phase|attr=border}}
 
* {{Element color/example|White}}
 
* {{Element color/example|Future}}
 
* {{Element color/example|(See below)}}
 
* {{Element color/example|X|note = Deprecated, redireced to {{code|1=Unknown (white)}}}}
 
* {{Element color/example|Redirect}}
 
* {{Element color/example|Undiscovered}}
 
* {{Element color/example|Unassessed}}
 
 
 
===Wikipedia article quality===
 
Used in: [[Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality]]
 
* {{Element color/example|FA}}
 
* {{Element color/example|A}}
 
* {{Element color/example|GA|note=Formal color is {{code|1=#66ff66}}}}
 
* {{Element color/example|B+|note=or Bplus}}
 
* {{Element color/example|B|note=Formal color is {{code|1=#b2ff66}}}}
 
* {{Element color/example|C}}
 
* {{Element color/example|Start}}
 
* {{Element color/example|Stub}}
 
* {{Element color/example|Unassessed}}
 
 
 
===Wikipedia article importance===
 
* {{Element color/example|Top}}
 
* {{Element color/example|High}}
 
* {{Element color/example|Mid}}
 
* {{Element color/example|Low}}
 
* {{code|1=???}}
 
* {{code|1=n/a}}
 
 
 
===Color names===
 
* {{Element color/example|Black}}
 
* {{Element color/example|White}}
 
 
 
===Table background===
 
* {{Element color/example|table title}}
 
* {{Element color/example|table header}}
 
* {{Element color/example|table colheader}}
 
* {{Element color/example|table mark}}
 
* {{Element color/example|table background}}
 
* {{Element color/example|table border}}
 
 
 
''Notes'':
 
Usage old style (subtemplate page /Table ...):
 
* <tt><nowiki>{{Element color/Table|header}}</nowiki></tt> &rarr; {{Element color/Table|header}}
 
:The parameter {{code|spec}} is also the first unnamed parameter:
 
* <tt><nowiki>{{Element color/Table|header}}</nowiki></tt> &rarr; {{Element color/Table|header}}
 
<br/>
 
{{Element color/Table/Overview}}
 
 
 
The '''default value''' (returned when the first parameter is not recognised) is {{code|background}}:
 
* <tt><nowiki>{{Element color/Table|}}</nowiki></tt> &rarr;  {{Element color/Table|}}.
 
:This default can be overridden by parameter:
 
* <tt><nowiki>{{Element color/Table|default=#a0f4c0}}</nowiki></tt> &rarr; {{Element color/Table|#a0f4c0}}
 
The '''return''' values are complete color values to be used as a CSS style, including the {{code|#}} but not the {{code|;}} character.
 
 
 
<span id="template by param"/>
 
 
 
==Template by parameter: {{tlx|element color|2=<nowiki>...</nowiki>}}==
 
All colors are also available via the simple template {{tlx|element color|2=<nowiki>...</nowiki>}}. That is, enter the color's meaningful name as a parameter to the template:
 
* {{tlx|element color|alkali metal}} &rarr; {{code|1={{element color|alkali metal}}}}.
 
The outcome (color id) is the same. The template is a bit more lax for the input (any capitalisation accepted, also singular accepted).
 
 
 
==Deprecated or unknown meaning==
 
'''Do not use these color names.''' In general, it is advised to use a more specific, meaningful color name. These color names are not used in main space, and most are redirected to another color.
 
* {{Element color/example|D|note = Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.}}
 
* {{Element color/example|E|note = Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.}}
 
* {{Element color/example|F|note = Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.}}
 
* {{Element color/example|X|note = Unspecific, redirected to {{code|1=Unknown (white)}}}}
 
* {{Element color/example|Disambig|note = Not a legend color, unknown intention.}}
 
* {{Element color/example|UnknownC|note = Unclear meaning. Redirected to {{code|1=Unknown phase}}}}
 
* {{Element color/example|veryreactive|note = Testing or sandbox.}}
 
 
 
==Colors hardcoded==
 
The same colors, with the same key, may be hardcoded in templates and pages:
 
* [[:Category:Pages containing element color directly|Category]]
 
* {{tlx|Periodic table (32 columns, micro)/elementcell}}
 
* {{tlx|Periodic table (Goldschmidt classification)}} (cells, not the legend)
 
* {{tlx|Periodic table (electron configuration)}}
 
* {{tlx|Periodic table (electron configuration lanthanides)}}
 
* [[Period 7 element]]
 
Infoboxes with hardcoded series color (header background color):
 
* {{tlx|infobox ununennium}}
 
* {{tlx|infobox unbinilium}}
 

Latest revision as of 19:48, 8 November 2014

no tests now