A new study has finally offered an explanation for Jupiter’s trippy colors and unusual swirls. These gaseous swirls have become the most recognizable aspect of the giant planet but also one of its most puzzling features. A team of scientists says they now understand what causes the planet’s distinctive color bands and why these swirls behave the way they do.

Astrophysicists Navid Constantinou and Jeffrey Parker have put forward a new theory that Jupiter’s jet streams, which control the flow of gasses around the planet’s outer atmosphere, are actually cut off and shaped by magnetized gasses from below Jupiter’s surface. Their findings were published in The Astrophysical Journal on Thursday.

Those majestic Jupiter swirls, up close.

Scientists have known that the colorful stripes of ammonia clouds that shape Jupiter’s look are guided by jet streams, or strong wind bands that sweep the gaseous planet. On the surface, these jet streams behave similarly to those on Earth’s atmosphere, but take on a different functionality below Jupiter’s atmospheric clouds. Thanks to the latest measurements from NASA’s Juno mission, which arrived at Jupiter on July 2016, scientists discovered these jet streams extend 3,000 kilometers (roughly 1,800 miles) deep before stopping abruptly, leaving Constantinou and Parker to wonder what causes such an exact end.

To get to the bottom of these jet streams, Constantinou and Parker created a mathematical model based on what is known about Earth’s own jet streams and weather patterns. Jupiter, which mostly consists of hydrogen and helium, experiences intense gas pressure below its surface which can force the electrons loose from hydrogen and helium molecules. Once these molecules are free to move around, they create electric and magnetic fields. And it just so happens that Jupiter doesn’t experience that level of pressure until the gas reaches 3,000 below the surface, precisely where the jet streams stop.

The team found that these jet streams flow to dictate the trippy patterns on Jupiter’s surface and end precisely at 3,000 kilometers due to pressurized magnetic fields. These magnetic fluctuations then influence the patterns and movements seen from space.

Constantinou and Parker say these calculations bring scientists one step closer to unraveling the mysterious interior of the gas giant. They plan to continue studying Jupiter’s magnetic fields and hope to one day see the planet as a space laboratory and example of how atmospheric flows can work on other planets.