How this works
Every colour on screen is calculated: a spectrum integrated against the
response of the human eye. None of them were picked by hand.
Light
The star is treated as a blackbody at its effective temperature. Planck's law
gives the emitted spectrum; an atmospheric transmission profile attenuates it
along a slant path whose length follows from the star's elevation, exactly as
Beer's law requires. The surviving spectrum is integrated against the CIE 1931
2° standard observer to get tristimulus XYZ, then converted to sRGB through the
D65 primaries. The code is ported from
starlight-filter,
which uses it to drive a display's gamma ramp.
Sky, ground and water
A Rayleigh atmosphere scatters short wavelengths out of the beam, so the sky is
lit by what the beam lost. The same model gives a blue noon and a red sunset
without either being coded in. Dust and haze absorb instead of
scattering, so those skies take the transmitted tint rather than its complement.
That is why Mars is butterscotch. Ground colour is the downwelling light times a
mineral reflectance curve, integrated the same way.
Vegetation
Photosynthesis is a quantum process, so the model counts photons rather than
energy. A reaction-centre pigment is chosen by weighing how many photons it can
capture against how much energy each one is worth once thermalised down to the
trap. Without that second term, far-red pigments would win under every star. Antenna pigments
are then layered on, subject to what can physically attach to what. The leaf's
reflectance is what survives that absorption, and its colour is the illuminant
times that reflectance.
Limits of the model
Pigment absorption curves are sums of Gaussians placed at literature peak
positions. The peaks are real; the band shapes are modelled, not digitised from
measured spectra. Stellar luminosities and radii are rounded literature values.
Habitable-zone bounds use the Kopparapu et al. (2013) coefficients, which are
fitted for 2600–7200 K and are flagged as extrapolated outside that range. The
nitroplast is a nitrogen-fixing organelle that has lost photosystem II and
RuBisCO, so it does not fix carbon. Its curve models the photosystem I antenna it
still carries.
This is a worldbuilding and teaching tool, not a radiative-transfer code.