模板:Element color/doc
本模板用於統一各種元素週期表的配色及格式。
此模板返回元素的圖例十二進制色碼,用於HTML編碼,如:
- {{Element color|Alkali metal}} →
#ff6666
- 有些顏色作為字體前景色之用,如:
- {{Element color|gas}} →
#cb0000
- 有些返回值為完整的邊框設定,如:
- {{Element color|Synthetic}} →
2px dotted #6e6e8e
駐:事實上真正返回的代碼類似 #ffc0c0;
(#
為 "#").
如此任何HTML頁面才不會將#視為編號用符號。
字體前景色選項
[編輯]style=color
attribute value
- 用法:
style="color:{{element color|gas}};"
物質相態(前景色)
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
方格邊框選項
[編輯]style=border
attribute value
- 用法:
style="border:{{element color|synthetic}};"
發現方法 (邊框)
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
背景色選項
[編輯]style=background
attribute value
- 用法:
style="background:{{element color|alkali metals}};"
金屬–非金屬分類
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Standard atomic weight
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- msi = most stable isotope
發現時期
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
例子: {{Periodic table (discovery periods)}}
Blocks
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
In period 8, theoretical elements:
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Numbers
[編輯]Used in: Valence (chemistry)#Maximum valences of the elements These colors correspond to the Alkali metal–noble gases range
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Metalloid cite classes
[編輯]See Template:Periodic table (list of metalloid lists)
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Setting a default color
[編輯]|1=not a color name
|default=#aabbcc
→ Template:Element color/secondary (use # not #)|1=not a color name
|default=thistle
→ Template:Element color/secondary
"Unknown" variants
[編輯]Usable in mainspace
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example -- Category
- Template:Element color/example --SoM
- Template:Element color/example -- Occurrence
- Template:Element color/example -- Occurrence
Wikipedia article quality
[編輯]Used in: Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Wikipedia article importance
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Color names
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Table background
[編輯]- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
- Template:Element color/example
Template:Element color/table/overview
Colors hardcoded
[編輯]The same colors, with the same key, may be hardcoded in templates and pages:
- See Category
{{Periodic table (32 columns, micro)/elementcell}}
{{Periodic table (Goldschmidt classification)}}
(cells, not the legend){{Periodic table (electron configuration lanthanides)}}
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}}