Template:Rpcc: Difference between revisions
Jump to navigation
Jump to search
imported>David Yamakuchi mNo edit summary |
John Leach (talk | contribs) m (Text replacement - "Elemental Class" to "Periodic table of elements") |
||
(28 intermediate revisions by one other user not shown) | |||
Line 6: | Line 6: | ||
|Synthetic = dbb0ff; | |Synthetic = dbb0ff; | ||
|f2f2f2;}} | |f2f2f2;}} | ||
|Metal = {{#switch: {{ :{{{eName|}}}/ | |Metal = {{#switch: {{ :{{{eName|}}}/Periodic table of elements}} | ||
|Post-Transition Metal= 5fff5a; | |Post-Transition Metal= 5fff5a; | ||
|Transition | |Transition metal = 8cdc73; | ||
|Lanthanide = 00ba00; | |||
|Metal = bebafc; | |Metal = bebafc; | ||
|Metalloid = bdfc37; | |Metalloid = bdfc37; | ||
|Non-Metal = fafa15; | |Non-Metal = fafa15; | ||
|Alkaline Earth Metal = dbb0ff; | |Alkaline Earth Metal = dbb0ff; | ||
|Alkali | |Alkali metal = db0bff; | ||
|Halogen = e7f38c; | |Halogen = e7f38c; | ||
|Noble Gas = 1cc1c1; | |Noble Gas = 1cc1c1; | ||
|Noble gas = 1cc1c1; | |||
|Rare Earth = dadaad; | |Rare Earth = dadaad; | ||
| | |Actinide = eddeed; | ||
|transuranic elements = addada; | |||
|Transuranic elements = addada; | |||
|Transuranic element = addada; | |||
|Trans-Uranium = addada; | |Trans-Uranium = addada; | ||
|Synthetic = | |Synthetic = e1ffd8; | ||
|f2f2f2;}} | |f2f2f2;}} | ||
|Electronegativity = {{#ifeq:"{{:{{{eName|}}}/Electronegativity}}"|"no data"|fff177|{{ | |Electronegativity = {{#ifeq:"{{:{{{eName|}}}/Electronegativity}}"|"no data"|fff177|{{ToColor|{{#expr:{{#expr:5-{{:{{{eName|}}}/Electronegativity}}}}*2.2 round 0}}}}}}; | ||
|Boiling point = {{#ifeq:"{{:{{{eName|}}}/Boiling point}}"|"no data"|aaaaff|{{ToColor|{{#expr:(({{:{{{eName|}}}/Boiling point}}+9950)/16384)*10 round 0}}}}}}; | |||
|f2f2f2; | |f2f2f2; | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{TlDoc}}</noinclude> | |||
</noinclude> |
Latest revision as of 04:50, 6 March 2024
Function and Usage
This template was made to be used with {{PTofE}}, {{cel}}, {{Rpc}}, {{PropertyCell}}, {{ToColor}}, and {{Periodic Table of Properties}}. It will return a color value that is dependent on the colorscheme and eName parameters passed to it.
Colorschemes
Currently supported color schemes are:
Phase
- Rpcc looks at (((eName)))/Standard phase for each element and returns a color based on the value there.
Metal
- Rpcc looks at (((eName)))/Periodic table of elements for each element and returns a color based on the value there.
Electronegativity
- Rpcc passes {{ToColor}} a value based on the value stored in (((eName)))/Electronegativity, and returns the color it gets back.
Boiling point
Note:This colorscheme is currently only supported (functional) on /Data and /Sandbox pages!
- For more information about this restriction, see {{Unit}}.
- Rpcc passes {{ToColor}} a value based on the value stored in (((eName)))/Boiling point, and simply returns the color it gets back.
"default"
- (= solid grey for the whole table)
Code
<includeonly>{{#switch: {{{colorscheme}}} |Phase = {{#switch: {{ :{{{eName}}}/Standard phase}} |Solid = 5fff5a; |Liquid = bebafc; |Gas = fafa15; |Synthetic = dbb0ff; |f2f2f2;}} |Metal = {{#switch: {{ :{{{eName|}}}/Periodic table of elements}} |Post-Transition Metal= 5fff5a; |Transition Metal = 8cdc73; |Metal = bebafc; |Metalloid = bdfc37; |Non-Metal = fafa15; |Alkaline Earth Metal = dbb0ff; |Alkali Metal = db0bff; |Halogen = e7f38c; |Noble Gas = 1cc1c1; |Rare Earth = dadaad; |Actinoid = eddeed; |Trans-Uranium = addada; |Synthetic = e1ffd8; |f2f2f2;}} |Electronegativity = {{#ifeq:"{{:{{{eName|}}}/Electronegativity}}"|"no data"|fff177|{{ToColor|{{#expr:{{#expr:5-{{:{{{eName|}}}/Electronegativity}}}}*2.2 round 0}}}}}}; |Boiling point = {{#ifeq:"{{:{{{eName|}}}/Boiling point}}"|"no data"|aaaaff|{{ToColor|{{#expr:(({{:{{{eName|}}}/Boiling point}}+9950)/16384)*10 round 0}}}}}}; |f2f2f2; }}</includeonly><noinclude> {{TlDoc}}</noinclude>