Actually, gases aren’t invisible: many are quite brightly coloured. For example, nitrogen dioxide is brown-y orange, chlorine has a yellowish green hue and iodine vapour is a vivid purple. Other gases in the atmosphere (particularly oxygen, carbon dioxide and water vapour) also absorb light, but at ultraviolet and infrared wavelengths that we can’t see. There’s a sweet spot between the absorption spectra of oxygen and water where not much light gets absorbed. Lo and behold, that’s exactly the range of light that we’ve evolved to see! So it’s not that gases are invisible, as such, it’s just that we can’t see atmospheric gases as they don’t have a colour in the visible range.