If the Sun were to suddenly disappear...

You have to ask?: Dead Men Don't Wear Plaid - Wikipedia

I don’t follow you. Are we worried about the Earth losing its atmosphere now too?

The sun has vanished. Our primary source of thermal energy is gone. Earth begins radiating retained heat into space. Within a couple of months, the surface of the Earth is at a temperature approximating Pluto’s.

Pluto’s atmosphere is 1/100,000th of the Earth’s normal atmosphere, because the atmospheric gases are ice floes on the surface. So the Earth’s atmosphere becomes a harder vacuum than has ever been artificially created by man.

I think the challenge of sustaining breathable atmosphere is realistic.

For a sci-fi treatment, read Fritz Lieber’s short story “A Pail of Air”.

Once the temperature reaches the freezing points of the various gases, the atmosphere would collapse to become a set of layers on top of the water ice. CO2 first, then argon, then nitrogen, then oxygen.

Wikipedia tells me (about CO2):

That’s more than a year after the sun gets magic’d out of existence, if the previous temperature estimates are correct. I don’t think there are going to be people around to worry about the dry ice hail / avalanche from the sky by that point. Maybe a couple of Icelandic gardeners?

Like an elemental rainbow.

Well, except for all the scientific holes in it. And it has some you could drive a free planet through.

For example, this one, which is depicted in that story. The problem with it is that nitrogen and oxygen first go through a liquid phase and liquids flow downhill. Nitrogen will freeze out at 63 K and oxy at 54 K, but the layers won’t be everywhere. Because of the liquid phases, they will be on top of the lowest areas, which are mostly going to be on top of former water bodies.