Template:Element color

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

This template returns the element's legend color, to be used in HTML makeup:

  • {{Element color|Alkali metals}}#ff6666
  • {{Element color|alkali metal}}#ff6666

Overview[edit]

State of matter (font color)[edit]

Font color; different from {{infobox element}} header colors
  •    Solid#000000
  •    Liquid#008000
  •    Gas#ff0000
  •    Solid (predicted)#000000
  •    Liquid (predicted)#008000
  •    Gas (predicted)#ff0000

Occurrence (cell border; aka frame)[edit]

  •    Primordial2px solid #8811ff
  •    From decay2px dashed #773300 Note: "Natural radio" deprecated
  •    Synthetic2px dotted #4499ff
  •    Undiscoverednone
  •    (See below)#f8f8f8 Note: deprecated

Metal–nonmetal categories[edit]

  •    Alkali metal#ff6666
  •    Alkaline earth metal#ffdead
  •    Lanthanide#ffbfff
  •    Rare earth metal#ffbffe Note: discussed, Nov/Dec 2013
  •    Actinide#ff99cc
  •    Superactinide#d1ddff
  •    Eka-superactinide#c6dd9d
  •    Transition metal#ffc0c0
  •    Metalloid#cccc99
  •    Noble gas#c0ffff
  •    Post-transition metal#cccccc Note: deprecated, use "poor metal" instead
  •    Poor metal#cccccc
  •    Diatomic nonmetal#e7ff8f
  •    Polyatomic nonmetal#a1ffc3
  •    Unknown chemical properties#e8e8e8
  •    Unknown#ffffff
  •    Other nonmetal#a0ffa0 Note: deprecated. See nonmetal
  •    Halogen#ffff99 Note: deprecated as a nonmetal category. See nonmetal

Metal–nonmetal categories, reduced set[edit]

  •    Metals#eee8aa
  •    Metalloids#cccc99
  •    Nonmetals#b0e0e6
  •    Inner transition metals#d8bfd8

Year and era[edit]

  •    Antiquity to Middle Ages#ffb9b9
  •    Before 1800#dfcdff
  •    1800-1849#cbffb9
  •    1850-1899#b9ffe4
  •    1900-1949#ffe2b9
  •    1950-1999#fff6b9
  •    2000-present#ffb9ef
  •    Future#

Example: {{Periodic table (discovery periods)}}

Blocks[edit]

  •    s-block#ff9999
  •    p-block#fdff8c
  •    d-block#99ccff
  •    f-block#9bff99
  •    g-block#fd99ff Note: g-block only exists theoretically, see below

In period 8, theoretical elements:

  •    s-block (predicted)#ffcccc
  •    p-block (predicted)#ffffbf
  •    d-block (predicted)#c7eeff
  •    f-block (predicted)#cdffcc
  •    g-block (predicted)#febfff

Numbers[edit]

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" variants[edit]

  •    Unknown#ffffff
  •    Unknown (white)#ffffff
  •    Unknown chemical properties#e8e8e8
  •    Unassessedtransparent
  •    Unknown phase#696969
  •    White#ffffff
  •    Future#
  •    (See below)#f8f8f8
  •    X#ffffff Note: Deprecated, redireced to Unknown (white)
  •    Redirect#c0c0c0

Wikipedia article quality[edit]

Used in: Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality

  •    FA#6699ff
  •    A#66ffff
  •    GA#55cc55 Note: Formal color is #66ff66
  •    B+#66ff66 Note: or Bplus
  •    B#bcff66 Note: Formal color is #b2ff66
  •    C#ffff66
  •    Start#ffaa66
  •    Stub#ff6666
  •    Unassessedtransparent

Wikipedia article importance[edit]

  •    Top#ff00ff
  •    High#ff88ff
  •    Mid#ffbbff
  •    Low#ffddff
  • ???

Color names[edit]

  •    Black#000000
  •    White#ffffff

Table background[edit]

  •    table title#d8d8d8
  •    table header#e0e0e0
  •    table colheader#e8e8e8
  •    table mark#f0f0f0
  •    table background#f8f8f8
  •    table border#a9a9a9

Notes: Usage old style (subtemplate page /Table ...):

  • {{Element color/Table|header}} → #e0e0e0
The parameter spec is also the first unnamed parameter:
  • {{Element color/Table|header}} → #e0e0e0


Available background colors for periodic tables
Usage: {{Element color/Table|header}}
Specification
(1st parameter)
Alternative
specification
Returns color Note
title caption #d8d8d8
header #e0e0e0
colheader rowheader, subheader, colh, rowh, subh #e8e8e8
mark #f0f0f0
background bg #f8f8f8 Also the default return value
border   #a9a9a9 Equals predefined color "grey"

The default value (returned when the first parameter is not recognised) is background:

  • {{Element color/Table|}} → #f8f8f8.
This default can be overridden by parameter:
  • {{Element color/Table|default=#a0f4c0}} → #f8f8f8

The return values are complete color values to be used as a CSS style, including the # but not the ; character.

Template by parameter: {{element color|...}}[edit]

All colors are also available via the simple template {{element color|...}}. That is, enter the color's meaningful name as a parameter to the template:

  • {{element color|alkali metal}}#ff6666.

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[edit]

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.

  •    D → Note: Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.
  •    E → Note: Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.
  •    F → Note: Historical (previously for years and eras), kept to ensure that old revisions do not appear broken.
  •    X#ffffff Note: Unspecific, redirected to Unknown (white)
  •    Disambig#00fa9a Note: Not a legend color, unknown intention.
  •    UnknownC → Note: Unclear meaning. Redirected to Unknown phase
  •    veryreactive → Note: Testing or sandbox.

Colors hardcoded[edit]

The same colors, with the same key, may be hardcoded in templates and pages:

Infoboxes with hardcoded series color (header background color):

See also[edit]