Home▸Articles▸Colours & Light

The Science Behind Rainbow Formation

A natural phenomenon explained by the principles of light refraction and reflection in water droplets.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is a Rainbow?

A rainbow is an optical phenomenon that occurs when sunlight or other light sources pass through water droplets in the atmosphere. It appears as a colorful arc of light due to the process of refraction, reflection, and dispersion within each droplet.

The primary rainbow we see has its colors arranged from red on the outside to violet on the inside, with each color corresponding to a specific wavelength of light.

Refraction and Reflection in Water Droplets

When light enters a water droplet, it slows down and changes direction, a process known as refraction. This bending of light causes the different wavelengths (colors) of light to separate, leading to dispersion.

Inside the droplet, light reflects off its inner surface before exiting back into the air, further contributing to the formation of the rainbow.

live demo · related simulation● LIVE

Dispersion and Color Spectrum

The key principle behind a rainbow is dispersion, where white light is split into its constituent colors. Each color has a different wavelength, which affects how it refracts and reflects within the droplet.

In the context of our simulation, adjusting parameters such as the angle of incidence or the size of the water droplets can change the observed spectrum and the position of the rainbow.

Real-World Applications

Understanding the science behind rainbows has practical applications in fields like meteorology and optics. For instance, it helps in predicting weather conditions based on atmospheric humidity and light intensity.

In technology, this knowledge is used to design optical devices such as prisms and lenses that manipulate light for various purposes.

Frequently asked questions

How does the angle of incidence affect a rainbow?

The angle of incidence influences where the primary rainbow appears in the sky. A higher angle results in a lower position of the rainbow, while a lower angle produces it at a higher position.

Why do we only see one complete arc of a rainbow and not a full circle?

We typically observe only an arc of the rainbow because the ground blocks our view of the part that would be behind us. In fact, if you were high enough above the ground (like in an airplane), you could potentially see a full circular rainbow.

Can rainbows form at night?

Rainbows can indeed form at night, but they require artificial light sources such as street lamps or headlights. The moonlight is too dim to produce visible rainbows under natural conditions.

Are there other types of rainbows besides the primary one?

Yes, secondary rainbows can also form when light undergoes two internal reflections within a water droplet before exiting, resulting in an inverted and less vivid rainbow compared to the primary one.

Try it live

Everything above runs in your browser — open Rainbow Formation Simulator and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Rainbow Formation Simulator simulation

What did you find?

Add reproduction steps (optional)