Rainbow clouds often accompany thunderstorms, as the air above the clouds is forced upwards, causing it to expand and cool. As this occurs, moisture in the air condenses, forming a cap-shaped cloud. Colors can then appear around the edges of these clouds as the particles within them diffract the sunlight, giving a whole new meaning to the phrase "every cloud has a silver lining.