# Can the color of an alien sky be calculated solely from atmospheric composition and the star's (or stars') spectral type(s)?

What exactly are the relevant numbers for such a calculation, and can it account for the color of the sky?

By sky color, I mean the day to day hue that humans (or something else with very similar eyes) would experience if present on the surface. Earth is "light blue" or "robin egg blue", I don't need all the possible variations for any conceivable weather condition. Oh, and this being for a computer game, it'd be nice if it was easily convertible to rgb() colorspace.

I'll have the star or stars' stellar classification. The planet's distance from the star(s), its atmosphere down to the 0.1% components (give or take), and a whole host of other numbers that don't seem relevant. I'm hoping to be able to generate crude landscapes from this. If I'm missing the relevant data, I can work that into the simulation possibly and have it available.

• I'm not sure how to formulate the math here into an answer, but there are some possibly helpful equations in the Rayleigh Scattering wikipedia article: en.wikipedia.org/wiki/Rayleigh_scattering Mar 24, 2020 at 22:29
• Color is a sensation; it exists in the mind. It is not a physical quantity; it does not exist in nature. It is true that what color the human mind perceives depends on the spectrum of the illuminant (= ambient ligtht) and on the properties of the illuminated object; but the human visual system has a built-in automatic white-balance correction system which will compensate for the illuminant so that familiar objects are perceived as having familiar colors. This is why the world around us doesn't change colors throughout the day, although the spectral composition of the light changes. Mar 24, 2020 at 22:30
• Shorter: you could maybe compute the spectral composition of the light. This won't tell you what color would be perceived. Mar 24, 2020 at 22:31
• I also found this discussion on converting from light curves to RGB: researchgate.net/post/Return_an_RGB_color_from_a_spectral_curve Mar 25, 2020 at 9:09

To determine the appearance of something, you need the emission spectrum of the light source, the star in this case, and the transmission/reflection spectra of the object together with other possible interactions between the medium and the radiation (i.e. Rayleigh scattering, thanks @Adrian, or fluorescence), the atmosphere in this case.

By the interaction of the light source and the substance, you can determine the resulting spectral distribution of the transmitted light, and thus "how the atmosphere would look like".

You would also need the sensitivity of the observer, but in this case I assume you are using the human eye.

• I think the human eye makes sense... even if the player is playing as some insectoid monster that sees in the far UV, I can neither paint a computer screen that color, nor would the player be able to see it anyway. Though sometimes it's difficult to know which direction to take with that sort of decision... Mar 24, 2020 at 20:45
• transmission/reflection spectra of the object, the atmosphere in this case. Don't forget the Rayleigh scattering - blue sky, warm yellow light on Earth surface, even if the spectral maximum is between 500-550nm - i.e. green. Mar 25, 2020 at 1:37