API: chem
Function: compositionColor()
lifecycle-kit
lifecycle-kit / chem / compositionColor
Function: compositionColor()
compositionColor(
c,backbone?):string
Defined in: chem/biomolecules.ts:180
The colour a body takes on, blended from its tissues' elements.
Uses the CPK colours from the ported table, so a chitinous creature reads carbon-dark and a mineral-rich one reads phosphorus-orange. The pixel a player sees is downstream of what the creature is actually made of.
The backbone reaches the player here most visibly: carbon's CPK colour is near-black, silicon's is a pale teal. A silicon-based creature looks different because it IS different, not because anything recoloured it.
Parameters
c
backbone?
Backbone = "C"
Returns
string
