Template:Rpcc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>David Yamakuchi
mNo edit summary
m (Text replacement - "Elemental Class" to "Periodic table of elements")
 
(85 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#switch: {{{colorscheme}}}
<includeonly>{{#switch: {{{colorscheme}}}
|Phase = {{#switch:{{{{{eName|}}}/Physical_Properties|info=Standard State}}{{!}}Solid = 5fff5a;{{!}}Liquid = bebafc;{{!}}Gas = fafa15;{{!}}Synthetic = dbb0ff;{{!}}f2f2f2}}
|Phase = {{#switch: {{ :{{{eName}}}/Standard phase}}
 
            |Solid = 5fff5a;
|       Metal = 00007f;
            |Liquid = bebafc;
            |Gas = fafa15;
            |Synthetic = dbb0ff;
            |f2f2f2;}}
|Metal = {{#switch: {{ :{{{eName|}}}/Periodic table of elements}}
            |Post-Transition Metal= 5fff5a;
            |Transition metal = 8cdc73;
            |Lanthanide = 00ba00;
            |Metal = bebafc;
            |Metalloid = bdfc37;
            |Non-Metal = fafa15;
            |Alkaline Earth Metal = dbb0ff;
            |Alkali metal = db0bff;
            |Halogen = e7f38c;
            |Noble Gas = 1cc1c1;
            |Noble gas = 1cc1c1;
            |Rare Earth = dadaad;
            |Actinide = eddeed;
            |transuranic elements = addada;
            |Transuranic elements = addada;
            |Transuranic element = addada;
            |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;
|f2f2f2;
}}
}}</includeonly><noinclude>
{{TlDoc}}</noinclude>

Latest revision as of 04:50, 6 March 2024


This documentation is transcluded from Template:Rpcc/doc (edit | history)

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>