RAINBOWS

Light, water, and geometry paint the sky

When sunlight enters raindrops, something magical happens. The light bends, bounces, and separates into every color of the spectrum. A rainbow is nature's light show—and you can understand exactly how it works.

What Is a Rainbow?

A rainbow is an optical phenomenon caused by reflection, refraction, and dispersion of light in water droplets, resulting in a spectrum of light appearing in the sky. In other words: sunlight splits into all its colors at once.

Rainbows have captivated humans for thousands of years. Ancient myths explained them as bridges or messages from the gods. Today, we know they're the result of simple physics—but they're no less beautiful.

Key Fact: Rainbows always form when the Sun is behind you and rain is in front of you. You can never walk toward a rainbow because it moves as you move.

How Does a Rainbow Form?

Hover over a diagram to reveal labels and use the button to animate the light path for the active step.

Step 1: Sunlight Enters

White sunlight is made up of all colors mixed together. When a ray of sunlight enters a raindrop, it hits the curved surface and starts to bend inward.

The process of light bending as it enters a new material is called refraction.

Diagram showing sunlight entering a raindrop and beginning to refract

Why Is the Rainbow Curved?

If one raindrop can make light bend and bounce, what happens when there are millions? Each raindrop creates a small arc of light. All of these arcs together form the rainbow you see.

The curve has a special geometry. Light from raindrops at different angles reaches your eye at different times. Raindrops that are 42° away from the line between you and the Sun all send red light to your eye. Raindrops at 40° send violet light. In between, all the other colors fill the arc.

The Geometry of a Rainbow

Observer Sun 42° Primary Rainbow The Sun is behind you. The rainbow forms at a specific angle (42°).

Why the curve? All the raindrops that can send light to your eyes at the rainbow angle form a cone shape. The edge of that cone is what you see: a circular arc. If you could see the whole thing (like from a plane), it would be a complete circle!

Alexander's Dark Band: Look carefully at the sky between the primary and secondary rainbows. It appears noticeably darker than the sky outside the secondary rainbow. This is called Alexander's dark band, and it's a beautiful consequence of the physics. Light simply cannot exit a raindrop at angles between 42° and 50° (between the two rainbows), so no light reaches your eyes from that region.

What Is the Color Order?

The colors of the rainbow always appear in the same order: ROYGBIV. This acronym helps us remember: Red, Orange, Yellow, Green, Blue, Indigo, Violet.

Why this order? Because of the refraction angles. Red light bends the least, so it appears on the outside of the arc. Violet light bends the most, so it appears on the inside. All the other colors fall in between, each at their own angle.

Red
Orange
Yellow
Green
Blue
Indigo
Violet

Note: In nature, rainbow colors blend smoothly. The boundaries between red and orange, or green and blue, aren't sharp—they flow into one another. We name the bands to describe what we see, but it's really a continuous spectrum.

What Is a Double Rainbow?

Sometimes, if light reflects twice inside a raindrop instead of once, you see a second rainbow outside the first. This is a secondary rainbow, and it's a rare and beautiful sight.

The secondary rainbow is always fainter because some light is lost with each reflection. It's also wider, spanning from about 50° to 53° from the antisolar point (the point opposite the Sun, viewed from you).

Color Reversal: Look carefully at a double rainbow. The secondary rainbow has its colors reversed! Red is on the inside, and violet is on the outside. This happens because light reflects twice instead of once.

Primary vs. Secondary Rainbow

You Sun Primary (Bright, 42°) Secondary (Faint, 50–53°) (Colors Reversed)

Explore with Interactive Ray Tracing

This live simulator shows exactly how light rays refract and reflect inside water droplets to create rainbows. Adjust the sun angle, watch the ray bundles, and see the caustic (bright zone) form at the critical deviation angle.

Pro tip: Use the gallery to load the "Rainbows" preset, then click the sun icon and drag to change the incident angle. Watch how the rays bunch at the critical deviation angle (~42° for red light).

You can also explore 60+ optical scenarios in the Ray Optics gallery, including:

Physics Simulation Dashboard

Use the controls below to explore how rainbows form. Change the Sun's height, toggle the secondary rainbow, and watch the light path animate through a raindrop. This simplified model shows the geometry and angles computed from real optics.

Observe Model Check Apply
Lower = more dramatic rainbow
Move the observer and watch the bow follow the new viewpoint.
More droplets make the arc look fuller and brighter.
Primary angle 42° red, 40° violet
Secondary angle 50-53° reversed colors

Color Angle Legend

Vocabulary

Refraction

The bending of light when it passes from one material to another (like air to water). Refraction is why your leg looks bent when you're in a swimming pool.

Reflection

The bouncing of light off a surface, like when light hits a mirror or the back of a raindrop. The angle of incidence equals the angle of reflection.

Dispersion

The separation of white light into its component colors (red, orange, yellow, green, blue, indigo, violet). Different colors refract at different angles.

Spectrum

The range of colors produced when white light is dispersed. The visible spectrum includes all colors we can see, from red to violet.

Prism

A transparent object with flat surfaces that refract and disperse light. A glass prism can create a rainbow-like spectrum, just like raindrops do.

Observer

The person viewing the rainbow. The rainbow only appears when the observer is positioned with the Sun behind them and rain in front of them.

Quick Check

Test your understanding with this short quiz. Choose the best answer for each question.

0/7 correct Question 1 of 7

Scavenger Hunt Challenge

Use the information from this page to answer the questions below. Great for classroom activities!

0/5 correct Start with Challenge 1

🔍 Challenge 1

Question: What are the four main processes that create a rainbow? List them in order.

Hint: They start with "S," "B," "B," and "C."

🔍 Challenge 2

Question: What position must the Sun be in for you to see a rainbow?

Hint: Look at the geometry diagram in the "Why Is the Rainbow Curved?" section.

🔍 Challenge 3

Question: Why is a secondary rainbow dimmer than a primary rainbow?

Hint: Think about how many times light reflects inside the raindrop.

🔍 Challenge 4

Question: Which color of the rainbow bends the MOST when entering a raindrop?

Hint: Check the "What Is the Color Order?" section and think about which is on the inside of a primary rainbow.

🔍 Challenge 5

Question: If the secondary rainbow's colors are reversed, which color is on the outside of the secondary rainbow?

Hint: It's the opposite of what you see in a primary rainbow.

Rainbows in Real Life

Try using the lesson ideas outdoors. Real observations help students connect the model to what they notice in the sky.

After Rain Showers

Look for sunlight breaking through behind you while light rain still falls ahead. That is the classic rainbow setup.

Water Spray

Garden hoses, sprinklers, and waterfalls can make mini rainbows. Adjust your position until the colors snap into view.

Observation Journal

Record Sun height, weather, direction faced, and whether a secondary rainbow appeared. That mirrors how scientists document sky observations.

Wonder Zone: Beyond the Ordinary

Rainbows are spectacular, but the optical phenomena related to them are even more diverse. Here are some stunning variations you might encounter:

🌙 Moonbows

When the Moon is full and the rain is close, you can see a rainbow created by moonlight! It appears dimmer and more colorless than a sunbow, but it's just as real.

🌫️ Fogbows

When fog is present instead of rain, you see a fogbow. It's whiter and fainter than a regular rainbow, but it follows the same physics.

🔄 Full Circle Rainbows

From high altitudes (like an airplane or mountaintop), you can sometimes see a complete circular rainbow! From ground level, the ground blocks half of it.

✨ Prism Rainbows

A glass or crystal prism can split white light into a spectrum, just like raindrops. You can create your own "rainbow" indoors with a prism and a light source.

🫧 Soap Bubble Rainbows

Soap bubbles create stunning rainbow colors through a different process called thin-film interference. The thin soap film acts like a prism, reflecting and refracting light in beautiful patterns.

☀️ Supernumerary Rainbows

Sometimes, faint colored bands appear just inside the primary rainbow. These are caused by wave interference and require a quantum understanding of light!