Revision as of 18:51, 23 April 2018 view sourceDePiep (talk | contribs)Extended confirmed users294,285 editsNo edit summary← Previous edit | Latest revision as of 08:02, 5 July 2023 view source Desb42 (talk | contribs)Extended confirmed users3,798 editsm remove duplicate keys | ||
(48 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{lc:{{#invoke:String|replace|source={{{1|}}}|pattern=|plain=false}}}}<!-- rm: hyphen |
{{#switch:{{lc:{{#invoke:String| replace| source= {{{1| }}}| pattern= | plain= false}}}}<!-- rm: hyphen, whitespace --> | ||
<!-- |
<!-- BLOCK | ||
note: per April 2021, block colors s..i-block are also *hardcoded* in ] for efficiency. DePiep --> | |||
| alkalimetal | alkalimetals = #ff6666 | |||
| alkalineearthmetal | alkalineearthmetals = #ffdead | |||
| lanthanide | lanthanides = #ffbfff | |||
| actinide | actinides = #ff99cc | |||
| transitionmetal | transitionmetals = #ffc0c0 | |||
| posttransitionmetal | posttransitionmetals = #cccccc | |||
| metalloid | metalloids = #cccc99 | |||
| polyatomicnonmetal | polyatomicnonmetals = #a1ffc3 | |||
| diatomicnonmetal | diatomicnonmetals = #e7ff8f | |||
| noblegas | noblegases = #c0ffff | |||
| superactinide | superactinides = #d1ddff | |||
| ekasuperactinide | ekasuperactinides = #c6dd9d | |||
<!-- BORDER Occurence. Gives full value, use "border:2px solid #4499ff"--> | |||
| primordial = 2px solid #6e6e8e | |||
| fromdecay = 2px dashed #6e6e8e | |||
| synthetic = 2px dotted #6e6e8e | |||
| undiscovered = 2px solid transparent | |||
| claimed = 2px solid transparent<!-- to be developed --> | |||
| none = 2px solid transparent | |||
<!-- FONT COLOR Phase, use "color:#000000"--> | |||
| solid = #000000<!-- HTML black --> | |||
| liquid = #008000<!-- HTML green --> | |||
| gas | gases = #ff0000<!-- HTML red --> | |||
| unknownphase = #696969<!-- HTML dimgrey --> | |||
<!-- PHASE PREDICTED (fontcolor) currently same as their master color --> | |||
| solid(predicted) | solids(predicted) = #000000<!-- HTML black --> | |||
| liquid(predicted) | liquids(predicted) = #008000<!-- HTML green --> | |||
| gas(predicted) | gases(predicted) = #ff0000<!-- HTML red --> | |||
<!-- GENERIC unknown, bgcolor --> | |||
| unknown = #ffffff | |||
| unknownchemicalproperty | unknownchemicalproperties | unknownproperty | unknownproperties | unknownchemicalpropertie | unknownpropertie = #e8e8e8 | |||
<!-- STRAIGHT COLOR (HTML W3C color def) --> | |||
| white = #ffffff | |||
| black = #000000 | |||
| red = #ff0000 | |||
| yellow = #ffff00 | |||
| blue = #0000ff | |||
| green = #008000 | |||
<!-- TABLE colors --> | |||
| table0 | tableborder = #a9a9a9 | |||
| table1 | tabletitle | tablecaption = #d8d8d8 | |||
| table2 | tableheader = #e0e0e0 | |||
| table3 | tablecolheader | tablerowheader | tablesubheader = #e8e8e8 | |||
| table4 | tablemark = #f0f0f0 | |||
| table5 | tablebackground | tablebg = #f8f8f8 | |||
<!-- PREDICTED PROPERTY color, derived from main color --> | |||
| alkalimetal(predicted) | alkalimetals(predicted) = #d8bcbc | |||
| alkalineearthmetal(predicted) | alkalineearthmetals(predicted) = #ffecd3 | |||
| lanthanide(predicted) = #ffffff | |||
| actinide(predicted) = #ffffff | |||
| superactinide(predicted) | superactinides(predicted) = #d1ddff<!-- same --> | |||
| ekasuperactinide(predicted) | ekasuperactinides(predicted) = #c6dd9d<!-- same --> | |||
| transitionmetal(predicted) | transitionmetals(predicted) = #ffe2e2 | |||
| posttransitionmetal(predicted) | posttransitionmetals(predicted) = #d8d8d8 | |||
| metalloid(predicted) | metalloids(predicted) = #e2e2aa | |||
| polyatomicnonmetal(predicted) | polyatomicnonmetals(predicted) = #d0ffe1 | |||
| diatomicnonmetal(predicted) | diatomicnonmetals(predicted) = #f2ffc2 | |||
| noblegas(predicted) | noblegases(predicted) = #ddffff | |||
<!-- BLOCK --> | |||
| sblock = #ff9999 | | sblock = #ff9999 | ||
| pblock = #fdff8c | | pblock = #fdff8c | ||
| dblock = #99ccff | | dblock = #99ccff | ||
| fblock = #9bff99 | | fblock = #9bff99 | ||
| gblock = #fd99ff |
| gblock = #fd99ff | ||
| hblock = #7ed9d9 | |||
| iblock = #e0c880 | |||
| sblock(predicted) = #ffcccc | | sblock(predicted) = #ffcccc | ||
| pblock(predicted) = #ffffbf | | pblock(predicted) = #ffffbf | ||
| dblock(predicted) = #c7eeff | | dblock(predicted) = #c7eeff | ||
| fblock(predicted) = #cdffcc | | fblock(predicted) = #cdffcc | ||
| gblock(predicted) = #febfff | | gblock(predicted) = #febfff<!-- | ||
GROUP --> | |||
| |
| group18 | noblegas | noblegases = #c0ffff<!-- | ||
OCCURRENCE, border. Use style= "border:2px solid #4499ff" --> | |||
| primordial = 2px solid #6e6e8e | |||
| fromdecay = 2px dashed #6e6e8e | |||
| synthetic = 2px dotted #6e6e8e | |||
| undiscovered = 2px solid transparent | |||
| none = 2px solid transparent<!-- techical placeholder for border --><!-- | |||
S.O.M. / PHASE, font color. Use style= "color:#007000" --> | |||
| solid = #000000<!-- black --> | |||
| liquid = #000000<!-- 2021-01-23 Emergency blackening b/c bad contrasts, see WT:ELEM#Emergency edit: remove fontcoloring State-of-Matter WAS: #007000 --> | |||
| gas = #000000<!-- 2021-01-23 Emergency blackening b/c bad contrasts, see WT:ELEM#Emergency edit: remove fontcoloring State-of-Matter WAS: #cb0000 --> | |||
| unknownphase = #000000<!-- 2021-01-23 Emergency blackening b/c bad contrasts, see WT:ELEM#Emergency edit: remove fontcoloring State-of-Matter WAS: #606060 --><!-- | |||
TABLE colors --> | |||
| table0 | tableborder = #a9a9a9 | |||
| table1 | tabletitle | tablecaption = #d8d8d8 | |||
| table2 | tableheader = #e0e0e0 | |||
| table3 | tablecolheader | |||
| tablerowheader | tablesubheader = #e8e8e8 | |||
| table4 | tablemark = #f0f0f0 | |||
| table5 | tablebackground | tablebg = #f8f8f8<!-- | |||
CATEGORIES TOP LEVEL --> | |||
| metal | metals = #eee8aa | |||
| metalloid | metalloids = #cccc99 | |||
| nonmetal | nonmetals = #b0e0e6 | | nonmetal | nonmetals = #b0e0e6 | ||
| unknownchemicalproperty | unknownchemicalproperties | unknownproperty | unknownproperties = #e8e8e8 | |||
| innertransitionmetal | innertransitionmetals = #d8bfd8 | |||
| vanderwaals = #e0b0e6 | |||
<!-- ERA (discovery years) --> | |||
| smallstructurenonmetal | smallstructurenonmetals = #b0c0e6 | |||
| antiquitytomiddleage = #ffb9b9<!-- see plural-s note in top --> | |||
| largestructurenonmetal | largestructurenonmetals = #b0e0e6<!-- | |||
| before1800 = #dfcdff | |||
ERA (discovery years) --> | |||
| 1800 | 18001849 | 18001849 = #cbffb9 | |||
| |
| antiquitytomiddleages = #ffb9b9 | ||
| |
| before1800 = #dfcdff | ||
| |
| 1800 | 18001849 = #cbffb9 | ||
| |
| 1850 | 18501899 = #b9ffe4 | ||
| 1900 | 19001949 = #ffe2b9 | |||
<!-- NUMBER --> | |||
| |
| 1950 | 19501999 = #fff6b9 | ||
| |
| 2000 | 2000present | 2000present = #ffb9ef<!-- | ||
METALLOID CITE CLASS --> | |||
| 2 | two = #ffdead | |||
| 3 | three = #ffbfff | |||
| 4 | four = #cccccc | |||
| 5 | five = #cccc99 | |||
| 6 | six = #a0ffa0 | |||
| 7 | seven = #ffff99 | |||
| 8 | eight = #d1ddff | |||
| 9 | nine = #c6dd9d | |||
<!-- Metalloid cite class --> | |||
| metalloidciteclass1of4 = #baffba | | metalloidciteclass1of4 = #baffba | ||
| metalloidciteclass2of4 = #badcff | | metalloidciteclass2of4 = #badcff | ||
| metalloidciteclass3of4 = #ffbadc | | metalloidciteclass3of4 = #ffbadc | ||
| metalloidciteclass4of4 = #ffffba | | metalloidciteclass4of4 = #ffffba | ||
<!-- standard atomic weight; table bg color |
<!-- SAW standard atomic weight; table bg color --> | ||
| sawheader = #b0e0e6 | | sawheader = #b0e0e6 | ||
| saw = #e1fcff<!-- 0/255: 132-30-255 --> | | saw = #e1fcff<!-- 0/255: 132-30-255 --> | ||
| msiheader = #c3ffd8 | | msiheader = #c3ffd8 | ||
| msi = #e1ffec<!-- 0/255: 100-30-255 --> | | msi = #e1ffec<!-- 0/255: 100-30-255 --> | ||
<!-- ARTICLE QUALITY grades --> | <!-- ARTICLE QUALITY grades --> | ||
| aqfa = #6699ff | | aqfa = #6699ff | ||
| aqa = #66ffff | | aqa = #66ffff | ||
| aqga = #55cc55<!-- adjusted, from 66ff66--> | | aqga = #55cc55<!-- adjusted, from 66ff66--> | ||
| aqb = #bcff66<!-- adjusted, from b2ff66 --> | | aqb = #bcff66<!-- adjusted, from b2ff66 --> | ||
| aqc = #ffff66 | | aqc = #ffff66 | ||
| aqstart = #ffaa66 | | aqstart = #ffaa66 | ||
| aqstub = #ff6666 | | aqstub = #ff6666 | ||
| aqlist = #aa88ff | | aqlist = #aa88ff | ||
<!-- AQ nonstandard grades --> | |||
| aqb+ | aqbplus = #66ff66 | |||
| aqfuture = #8a95c9 | |||
| aqcurrent = #d462ff | |||
| aqdisambig = #00fa9a | |||
| aqna = #f5f5f5 | |||
| aqredirect = #c0c0c0 | |||
| aqbook = #98ff98 | |||
| aqtemplate = #fbceb1 | |||
| aqcategory = #ffdb58 | |||
| aqunassessed = #f8f9fa<!-- same as unk-??? --> | |||
<!-- WP ARTICLE IMPORTANCE (from template:Importance/colour) --> | <!-- WP ARTICLE IMPORTANCE (from template:Importance/colour) --> | ||
| imptop = #ff00ff | | imptop = #ff00ff | ||
| imphigh = #ff88ff | | imphigh = #ff88ff | ||
| impmid = #ffbbff | | impmid = #ffbbff | ||
| implow = #ffddff | | implow = #ffddff | ||
| impbottom = #ffeeff | | impbottom = #ffeeff | ||
| imp??? = #f8f9fa | | imp??? = #f8f9fa | ||
| impna | impn/a = #f5f5f5 | | impna | impn/a = #f5f5f5 | ||
<!-- --> | <!-- NUMBER, VALENCE --> | ||
| 0 | zero = #c0ffff | |||
| #default={{Element color/secondary|1={{{1|}}} |default={{{default|transparent}}} }} | |||
| 1 | one = #ff8989 | |||
| 2 | two = #ffdead | |||
| 3 | three = #ffbfff | |||
| 4 | four = #cccccc | |||
| 5 | five = #cccc99 | |||
| 6 | six = #a0ffa0 | |||
| 7 | seven = #ffff99 | |||
| 8 | eight = #d1ddff | |||
| 9 | nine = #c6dd9d | |||
| unknownvalence = #ededed | |||
<!-- STRAIGHT COLOR (HTML W3C color def) --> | |||
| white = #ffffff | |||
| black = #000000 | |||
| red = #ff0000 | |||
| yellow = #ffff00 | |||
| blue = #0000ff | |||
| green = #008000 | |||
<!-- BLANK (no input): return {{{default|}} (could be blank; no error) --> | |||
|={{{default|}}} | |||
<!-- DEFAULT --> | |||
|#default = {{Element color/secondary|1={{{1|}}} |default={{{default|transparent}}} }} | |||
}}<!-- | }}<!-- | ||
Latest revision as of 08:02, 5 July 2023
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
→#7ed9d9
-
i-block
→#e0c880
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
→#c0ffff
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
→#000000
- A
Gas
→#000000
- A
Unknown phase
→#000000
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
→#000000
-- 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: