In the Lord of the Rings franchise, Gandalf (Ian McKellen) undergoes quite the transformation. He begins as Gandalf the Grey but eventually transforms into Gandalf the White. While each personality contains the same essence of the wizard, they're vastly different beings.

Gandalf the Grey is a vital part of Frodo Baggins' journey to destroy the One Ring. The wizard passes the ring down from Bilbo Baggins to his nephew Frodo. He accompanies Frodo on his journey to Rivendell where the Fellowship of the Ring is formed. He sacrifices himself while fighting the Balrog in the Mines of Moria so that the rest of the fellowship can escape. He later rises as Gandalf the White.

RELATED: Lord of the Rings: Legolas Basically Married Gimli

In J.R.R. Tolkien's Middle Earth, wizards are distinguished within their order by different colors. While there isn't necessarily a strict ranking system with the colors, one thing is for certain — white is an upgrade from grey. As the Stack Exchange explains, that color change comes with new knowledge and abilities.

Gandalf the Grey

Gandalf the Grey

When audiences meet Gandalf in Lord of the Rings: The Fellowship of the Ring, he is donned in grey robes. While he wasn't the most powerful wizard in Middle-earth, he could still wield an enormous amount of magic. But Gandalf the Grey's humble nature kept him from flaunting his true nature. He was a member of the divine race of the Maiar and chose to take on the appearance of an elderly human man. He befriended members of all different species but took a specific liking to hobbits.

While he has always been massively powerful, The Fellowship of the Ring doesn't show Gandalf flaunting his powers much. Early in the film, he uses his magic more to entertain hobbits -- enchanting fireworks to make them more lively and blowing impressive smoke rings from his pipe. In Middle-earth, a wizard's power is housed within his staff. Gandalf is shown using his staff in combat against Saruman and the Balrog. This is the most extensive showing of Gandalf the Grey's powers in The Fellowship of the Ring.

RELATED: Lord of the Rings Cast Campaign to Preserve Tolkien House

Gandalf the White

Gandalf the White standing in the mist with his staff on the left in Lord of the Rings.

In Lord of the Rings: Two Towers, Gandalf returns as Gandalf the White. His hair and robes have gone from grey to white and he's shown with a brand new staff as well. Middle-earth diety Eru the Authority decides to send Gandalf back with additional power and wisdom. He was sent back because he did not complete his task of defeating Sauron. With an important role like that comes some seriously advanced powers that Gandalf wields more freely. One of the earlier examples of this is when he easily breaks a mind-controlled King Théoden from Sauron's toxic hold. This power is a far cry from the way he used his powers earlier in the Peter Jackson movie series. With seriously upgraded powers like that, Gandalf was made the leader of wizards on Middle-earth.

Gandalf's personality changed a bit when he became Gandalf the White. While Gandalf the Grey was a serious wizard, he still had light-hearted moments. The same cannot be said about Gandalf the White. He had a pressing mission to focus on, so he became a little more serious than his former self. The wizard went through serious changes, both in the physical and spiritual sense. But at his core, Gandalf was always the same man. He was a truly great and powerful wizard that fully believed in Frodo's ability to destroy the ring and stop Sauron. That strong sense of dedication is why he was trusted with such an important task in the Lord of the Rings series.

KEEP READING: Lord of the Rings Star Shares the 'Painful' Advice They Received From Peter Jackson