Revision as of 23:35, 1 December 2020 view sourceDePiep (talk | contribs)Extended confirmed users294,285 edits Undid revision 991791398 by Double sharp (talk) Please maintain some stabilityTag: Undo← Previous edit | Revision as of 11:23, 3 January 2021 view source LaundryPizza03 (talk | contribs)Extended confirmed users51,444 edits Add alkalimetallegacy (for historical purposes) and superactinides (for future use, as seen in the list of e- configs in Extended periodic table)Tag: RevertedNext edit → | ||
Line 1: | Line 1: | ||
{{#switch:{{lc:{{#invoke:String| replace| source= {{{1| }}}| pattern= | plain= false}}}}<!-- rm: hyphen, whitespace --> | {{#switch:{{lc:{{#invoke:String| replace| source= {{{1| }}}| pattern= | plain= false}}}}<!-- rm: hyphen, whitespace --> | ||
<!-- CATEGORY, bg color. Use style= "background:#ff99cc"--> | <!-- CATEGORY, bg color. Use style= "background:#ff99cc"--> | ||
| alkalimetallegacy | alkalimetalslegacy = #ff6666<!-- Color prior to 1 December 2020; deprecated due to a11y concerns --> | |||
| alkalimetal | alkalimetals = #ff9d9d | | alkalimetal | alkalimetals = #ff9d9d | ||
| alkalineearthmetal | alkalineearthmetals = #ffdead | | alkalineearthmetal | alkalineearthmetals = #ffdead | ||
Line 13: | Line 14: | ||
| halogen | halogens = #ffff99 | | halogen | halogens = #ffff99 | ||
| noblegas | noblegases = #c0ffff | | noblegas | noblegases = #c0ffff | ||
| superactinide | superactinides = #d1ddff<!-- Reserved for future use --> | |||
| unknownchemicalproperty | unknownchemicalproperties | unknownproperty | unknownproperties = #e8e8e8 | | unknownchemicalproperty | unknownchemicalproperties | unknownproperty | unknownproperties = #e8e8e8 | ||
<!-- OCCURRENCE, border. Use style= "border:2px solid #4499ff" --> | <!-- OCCURRENCE, border. Use style= "border:2px solid #4499ff" --> |
Revision as of 11:23, 3 January 2021
transparent
Template documentation[view] [edit] [history] [purge]This template returns the element's legend color, to be used in HTML makeup:
- Some color codes are designed as fontcolor:
{{Element color|f-block}}
→#9bff99
- Some return values are designed as full border settings:
{{Element color|Synthetic}}
→2px dotted #6e6e8e
Note: the true code returned is like: #ffc0c0;
(#
being "#").
This way, any HTML page will not use "#" to start a numbered list.
Background color options
style=background
attribute value- In code:
style="background:{{element color|alkali metals}};"
Blocks
-
s-block
→#ff9999
-
p-block
→#fdff8c
-
d-block
→#99ccff
-
f-block
→#9bff99
-
g-block
→#fd99ff
-
h-block
→transparent
-
i-block
→transparent
Theoretical elements (option, usually full color is used. See g-block):
-
s-block (predicted)
→#ffcccc
-
p-block (predicted)
→#ffffbf
-
d-block (predicted)
→#c7eeff
-
f-block (predicted)
→#cdffcc
-
g-block (predicted)
→#febfff
Groups
-
group 18
→transparent
Note: noble gases
Categories metal–metalloid–nonmetal
-
Metal
→#eee8aa
-
Metalloid
→#cccc99
-
Non-metal
→#b0e0e6
Standard atomic weight
-
saw-header
→#b0e0e6
-
saw
→#e1fcff
-
msi-header
→#c3ffd8
-
msi
→#e1ffec
- msi = most stable isotope
Year and era
-
Antiquity to Middle Ages
→#ffb9b9
-
Before 1800
→#dfcdff
-
1800-1849
→#cbffb9
-
1850-1899
→#b9ffe4
-
1900-1949
→#ffe2b9
-
1950-1999
→#fff6b9
-
2000-present
→#ffb9ef
Numbers
Used in: Valence (chemistry)#Maximum valences of the elements These colors correspond to the Alkali metal–noble gases range
-
0
→#c0ffff
-
1
→#ff8989
-
2
→#ffdead
-
3
→#ffbfff
-
4
→#cccccc
-
5
→#cccc99
-
6
→#a0ffa0
-
7
→#ffff99
-
8
→#d1ddff
-
9
→#c6dd9d
-
unknown valence
→#ededed
Metalloid cite classes
See Lists of metalloids § Chronological list
-
Metalloid citeclass 1of4
→#baffba
Note: currently: 93% -
Metalloid citeclass 2of4
→#badcff
Note: currently: 44% -
Metalloid citeclass 3of4
→#ffbadc
Note: currently: 24% -
Metalloid citeclass 4of4
→#ffffba
Note: currently: 9%
Cell border options
style=border
attribute value- In code:
style="border:{{element color|synthetic}};"
Occurrence (cell border)
-
Primordial
→2px solid #6e6e8e
-
From decay
→2px dashed #6e6e8e
Note: "Natural radio" deprecated -
Synthetic
→2px dotted #6e6e8e
-
Undiscovered
→2px solid transparent
-
None
→2px solid transparent
Font color options
style=color
attribute value- In code:
style="color:{{element color|gas}};"
State of matter (font color)
As of January 2021, not used- A
Solid
→#000000
- A
Liquid
→#007000
- A
Gas
→#cb0000
- A
Unknown phase
→#606060
Setting a default color
|1=not a color name
|default=#aabbcc
→ #aabbcc (use # not #)|1=not a color name
|default=thistle
→ thistle
"Unknown" variants
Usable in mainspace
-
White
→#ffffff
-
Unknown chemical properties
→#e8e8e8
-- Category - A
Unknown phase
→#606060
-- State of Matter -
Undiscovered
→2px solid transparent
Note: Border -- Occurrence -
none
→2px solid transparent
Note: Border -- Occurrence
Misplaced Pages article quality
Used in: Misplaced Pages:WikiProject Elements/Articles/Periodic Table by Quality
-
aq-FA
→#6699ff
-
aq-A
→#66ffff
-
aq-GA
→#55cc55
Note: Formal color is#66ff66
-
aq-B
→#bcff66
Note: Formal color is#b2ff66
-
aq-C
→#ffff66
-
aq-Start
→#ffaa66
-
aq-Stub
→#ff6666
Misplaced Pages article importance
-
imp-Top
→#ff00ff
-
imp-High
→#ff88ff
-
imp-Mid
→#ffbbff
-
imp-Low
→#ffddff
-
imp-???
→#f8f9fa
-
imp-n/a
→#f5f5f5
Color names
-
Black
→#000000
-
White
→#ffffff
-
blue
→#0000ff
-
green
→#008000
-
red
→#ff0000
-
yellow
→#ffff00
Table background
-
table title
→#d8d8d8
-
table header
→#e0e0e0
-
table colheader
→#e8e8e8
-
table mark
→#f0f0f0
-
table background
→#f8f8f8
-
table border
→#a9a9a9
Specification (1st parameter) |
Alternative specification |
Returns color | Note |
---|---|---|---|
title | caption | #d8d8d8 | |
header | #e0e0e0 | ||
colheader | rowheader, subheader | #e8e8e8 | |
mark | #f0f0f0 | ||
background | bg | #f8f8f8 | Also the default return value |
border | #a9a9a9 | Equals predefined color "grey" |
Colors hardcoded
The same colors, with the same key, may be hardcoded in templates and pages:
- See Category:Pages containing element color directly (6)
{{Periodic table (32 columns, micro)/elementcell}}
{{Periodic table (Goldschmidt classification)}}
(cells, not the legend){{Infobox element/symbol-to-occurrence/format2}}
{{Infobox element/symbol-to-block/format2}}
Tracking and warning
Element color ID's used in mainspace (articles) but not in {{Element color}} are listed in Category:Element color has unknown ID (0); these articles show awarning in preview.
Template data
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Element color in articles based on its TemplateData.TemplateData for Element color
This template returns an RGB color number, for usage in css style setting (style="background:#ab23a6"). For certain input, a css fontcolor or border style is returned.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Color class name | 1 | Predefined class name to return its legend color
| String | required |
Deprecated and experimental parameters
Those not for mainspace are kept in {{Element color/secondary}}
See also
The above documentation is transcluded from Template:Element color/doc. (edit | history)Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories: