แม่แบบ:Element color/doc

This template returns the element's legend color, to be used in HTML makeup:-  → f-block- Some color codes are designed as fontcolor.- Some return values are designed as full border settings:-  → synthetic
Note: the true code returned is like:  ( being "#").
This way, any HTML page will not use "#" to start a numbered list.

**Background color options**
In code: 

**Blocks**
 s-block- p-block- d-block- f-block- g-block- h-block- i-block
Theoretical elements (option, usually full color is used. See g-block):- s-block (predicted)- p-block (predicted)- d-block (predicted)- f-block (predicted)- g-block (predicted)

**Groups**
 note=noble gases

**Categories metal–metalloid–nonmetal**
 note=- note=- note=

**Standard atomic weight**
 saw-header- saw- msi-header- msi
msi = most stable isotope

**Year and era**
 Antiquity to Middle Ages- Before 1800- 1800-1849- 1850-1899- 1900-1949- 1950-1999- 2000-present
Example: Periodic table (by discovery periods)

**Numbers**
Used in: Valence (chemistry)#Maximum valences of the elements
These colors correspond to the Alkali metal–noble gases range- 0- 1- 2- 3- 4- 5- 6- 7- 8- 9- unknown valence

**Metalloid cite classes**
See Template:Periodic table (list of metalloid lists)- note=currently: 93%- note=currently: 44%- note=currently: 24%- note=currently: 9%

**Cell border options**
In code: 

**Occurrence (cell border)**
 attr=border- attr=border- attr=border- attr=border- attr=border

**Font color options**
In code: 

**State of matter (font color)**
 attr=color- attr=color- attr=color- attr=color

**Setting a default color**
not a color name &#x23;aabbcc → default=#aabbcc (use &#x23; not #)
not a color name thistle → default=thistle

**"Unknown" variants**
Usable in mainspace- White- Unknown chemical properties -- Category- Note=Font color --SoM- note=Border -- Occurrence- note=Border -- Occurrence

**Wikipedia article quality**
Used in: Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality- aq-FA- aq-A- aq-C- aq-Start- aq-Stub

**Wikipedia article importance**
 imp-Top- imp-High- imp-Mid- imp-Low- imp-???- imp-n/a

**Color names**
 Black- White- blue- green- red- yellow

**Table background**
 table title- table header- table colheader- table mark- table background- attr=border

**Colors hardcoded**
The same colors, with the same key, may be hardcoded in templates and pages:- See Category:Pages containing element color directly- 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 Element color has unknown ID; these articles show awarning in preview.

**Template data**
{
	"params": {
		"1": {
			"label": "Color class name",
			"description": "Predefined class name to return its legend color",
			"example": "alkali metal",
			"type": "string",
			"required": true
		}
	},
	"description": "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."
}

**Deprecated and experimental parameters**
Those not for mainspace are kept in Element color/secondary

**See also**
 element color/example- element cell/overview