Template:Rpcc/doc: Difference between revisions
Jump to navigation
Jump to search
imported>David Yamakuchi m (New page: == Usage == This template was made to be used with {{tl|PTofE}}, {{tl|Resizable periodic cell}}, {{tl|PropertyCell}}, and {{tl|Periodic Table of Properties}}. == Colorschemes == Currentl...) |
John Leach (talk | contribs) m (Text replacement - "Elemental Class" to "Periodic table of elements") |
||
(10 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Usage == | == Function and Usage == | ||
This template was made to be used with {{tl|PTofE}}, {{tl| | |||
This template was made to be used with {{tl|PTofE}}, {{tl|cel}}, {{Tl|Rpc}}, {{tl|PropertyCell}}, {{tl|ToColor}}, and {{tl|Periodic Table of Properties}}. It will return a color value that is dependent on the '''colorscheme''' and '''eName''' parameters passed to it. | |||
== Colorschemes == | == Colorschemes == | ||
Currently supported color schemes are: | 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 {{tl|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 {{tl|Unit}}. | |||
:Rpcc passes {{tl|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 == | |||
<pre><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> | |||
</pre> |
Latest revision as of 04:49, 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>