Template:CCol

From Yogstation-13
Revision as of 11:19, 20 April 2020 by Helpful Herbert (talk | contribs) (Created a "CellColor"-template for highlighting ressource-related table-cells)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Compact CellColor template for coloring table cells. Intended for use in ressource-related tables like Guide to Research and Development, where a non-hardcoded way of highlighting different ressources in long tables could help increasing readability.

Parameter-Usage

Parameter Example Description
rmet y Optional, color-switch (Ressource Metal). Make sure to set a non-empty value. Do not combine with other switches.
rgla y Optional, color-switch (Ressource Glass). Make sure to set a non-empty value. Do not combine with other switches.
rpla y Optional, color-switch (Ressource Plasma). Make sure to set a non-empty value. Do not combine with other switches.
rsil y Optional, color-switch (Ressource Silver). Make sure to set a non-empty value. Do not combine with other switches.
rgol y Optional, color-switch (Ressource Gold). Make sure to set a non-empty value. Do not combine with other switches.
rura y Optional, color-switch (Ressource Uranium). Make sure to set a non-empty value. Do not combine with other switches.
rdia y Optional, color-switch (Ressource Diamond). Make sure to set a non-empty value. Do not combine with other switches.
rtit y Optional, color-switch (Ressource Titanium). Make sure to set a non-empty value. Do not combine with other switches.
rblu y Optional, color-switch (Ressource Bluespace). Make sure to set a non-empty value. Do not combine with other switches.

Examples

Basic

{| class="wikitable"
![[File:Metal.png]]
![[File:Glass.png]]
![[File:Plasmadone.png]]
![[File:Silverdone.png]]
![[File:Golddone.png]]
![[File:Uraniumdone.png]]
![[File:Diamonddone.png]]
![[File:Titaniumdone.png]]
![[File:Bluespace_Crystal.png]]
|-
|{{CCol|rmet=y}}|a1
|{{CCol|rgla=y}}|a2
|{{CCol|rpla=y}}|b1
|{{CCol|rsil=y}}|b2
|{{CCol|rgol=y}}|c2
|{{CCol|rura=y}}|d1
|{{CCol|rdia=y}}|d2
|{{CCol|rtit=y}}|e1
|{{CCol|rblu=y}}|e2
|}
Metal.png Glass.png Plasmadone.png Silverdone.png Golddone.png Uraniumdone.png Diamonddone.png Titaniumdone.png Bluespace Crystal.png
a1 a2 b1 b2 c2 d1 d2 e1 e2

Wrong usage: Missing / double color-selection

{| class="wikitable" 
!{{CCol}}|a1
!{{CCol|rdia=y|rmet=y}}|a2
|-
|{{CCol|rgla=y|rpla=y}}|b1
|{{CCol}}|b2
|}
a1 a2
b1 b2