For example, chlorine gas absorbs visible light in the red and blue parts of the spectrum, so it appears to be yellow-green in color.
If a gas absorbs a large amount of visible light, it will appear to be black. For example, carbon black is a material that absorbs almost all visible light, so it appears to be black.