قالب:Element color
This template returns the element's legend color, to be used in HTML makeup:
- {{Element color|f-block}} →
#9bff99
- Some color codes are designed as fontcolor.
- 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
attribute valuestyle=background- In code:
style="background:{{element color|alkali metals}};"
Blocks
-
→ #ff9999s-block -
→ #fdff8cp-block -
→ #99ccffd-block -
→ #9bff99f-block -
→ #fd99ffg-block -
→ #7ed9d9h-block -
→ #e0c880i-block
Theoretical elements (option, usually full color is used. See g-block):
-
→ #ffccccs-block (predicted) -
→ #ffffbfp-block (predicted) -
→ #c7eeffd-block (predicted) -
→ #cdffccf-block (predicted) -
→ #febfffg-block (predicted)
Groups
-
→ #c0ffff Note: noble gasesgroup 18
Categories metal–metalloid–nonmetal
-
→ #eee8aaMetal -
→ #cccc99Metalloid -
→ #b0e0e6Non-metal
Standard atomic weight
-
→ #b0e0e6saw-header -
→ #e1fcffsaw -
→ #c3ffd8msi-header -
→ #e1ffecmsi
- msi = most stable isotope
Year and era
-
→ #ffb9b9Antiquity to Middle Ages -
→ #dfcdffBefore 1800 -
→ #cbffb91800-1849 -
→ #b9ffe41850-1899 -
→ #ffe2b91900-1949 -
→ #fff6b91950-1999 -
→ #ffb9ef2000-present
Example: {{Periodic table (discovery periods)}}
Numbers
Used in: Valence (chemistry)#Maximum valences of the elements These colors correspond to the Alkali metal–noble gases range
-
→ #c0ffff0 -
→ #ff89891 -
→ #ffdead2 -
→ #ffbfff3 -
→ #cccccc4 -
→ #cccc995 -
→ #a0ffa06 -
→ #ffff997 -
→ #d1ddff8 -
→ #c6dd9d9 -
→ #edededunknown valence
Metalloid cite classes
See Template:Periodic table (list of metalloid lists)
-
→ #baffba Note: currently: 93%Metalloid citeclass 1of4 -
→ #badcff Note: currently: 44%Metalloid citeclass 2of4 -
→ #ffbadc Note: currently: 24%Metalloid citeclass 3of4 -
→ #ffffba Note: currently: 9%Metalloid citeclass 4of4
Cell border options
attribute valuestyle=border- In code:
style="border:{{element color|synthetic}};"
Occurrence (cell border)
-
→ 2px solid #6e6e8ePrimordial -
→ 2px dashed #6e6e8e Note: "Natural radio" deprecatedFrom decay -
→ 2px dotted #6e6e8eSynthetic -
→ 2px solid transparentUndiscovered -
→ 2px solid transparentNone
Font color options
attribute valuestyle=color- In code:
style="color:{{element color|gas}};"
State of matter (font color)
-
→ #000000Solid -
→ #000000Liquid -
→ #000000Gas -
→ #000000Unknown phase
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
-
→ #ffffff Note: Deprecated, too genericUnknown -
→ #ffffffWhite -
→ #e8e8e8Unknown chemical properties
-- Category -
→ #000000Unknown phase
--SoM -
→ 2px solid transparent Note: BorderUndiscovered
-- Occurrence -
→ 2px solid transparent Note: Bordernone
-- Occurrence
Wikipedia article quality
Used in: Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality
-
→ #6699ffaq-FA -
→ #66ffffaq-A -
→ #55cc55 Note: Formal color isaq-GA#66ff66 -
→ #bcff66 Note: Formal color isaq-B#b2ff66 -
→ #ffff66aq-C -
→ #ffaa66aq-Start -
→ #ff6666aq-Stub
Wikipedia article importance
-
→ #ff00ffimp-Top -
→ #ff88ffimp-High -
→ #ffbbffimp-Mid -
→ #ffddffimp-Low -
→ #f8f9faimp-??? -
→ #f5f5f5imp-n/a
Color names
-
→ #000000Black -
→ #ffffffWhite
-
→ #0000ffblue -
→ #008000green -
→ #ff0000red -
→ #ffff00yellow
Table background
-
→ #d8d8d8table title -
→ #e0e0e0table header -
→ #e8e8e8table colheader -
→ #f0f0f0table mark -
→ #f8f8f8table background -
→ #a9a9a9table border
قالب:Element color/table/overview
Colors hardcoded
The same colors, with the same key, may be hardcoded in templates and pages:
- See Category:Category:Pages containing element color directly (0)
{{Periodic table (32 columns, micro)/elementcell}}{{Periodic table (Goldschmidt classification)}}(cells, not the legend){{Periodic table (electron configuration lanthanides)}}{{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 (9); these articles show awarning in preview.
Template data
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.
| وسيط | وصف | نوع | حالة | |
|---|---|---|---|---|
| Color class name | 1 | Predefined class name to return its legend color
| نص | مطلوب |
Deprecated and experimental parameters
Those not for mainspace are kept in {{Element color/secondary}}
See also
- {{element color/secondary}} -- development and deprecated colors etc., should not appear in mainspace.
- {{element color/example}}
- {{element cell/overview}}
| The above documentation is transcluded from قالب:Element 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. |