Haikou city residents in China were astounded when they observed a rainbow in the sky that was shaped like a cloud.

The phenomena, though, was actually a cloud and not a rainbow.

A Pileus cloud, also referred to as a cap cloud and a scarf cloud, was visible in Haikou on August 21.

A pileus is created when the quickly rising air in the cumulonimbus updraft pushes against the cooler air above it.

The moisture condenses as a result right along the top of the updraft, resulting in the Pileus' development.

When the sun is shining at just the perfect angle, light is reflected between the cloud's ice crystals and droplets, giving the Pileus its rainbow-like colors.

But these clouds typically only last a few hours.

This is because they are "eaten up" by the cloud that is above them; Pileus is absorbed by the lower cloud by convection.