The seasonal celebration dates back to pre-Christian Europe. Back then the celebration, like most pagan holidays based on the harvests or seasons, required a human sacrifice to the gods. To choose the lucky winner, a coin or bean would be placed in the King's Cake before baking, and whichever of the tribesmen found the trinket would be treated like a king — until their time was up.
When the Christians took over, they kept the cake but got rid of the unpleasant ritual sacrifice. Suddenly winning the task of hosting next year's party or buying the next cake doesn't seem so bad.
The three traditional colors of Mardi Gras were officially adopted by the Krewe of Rex, one of the earliest private clubs to hold exclusive parties and parades during the Mardi Gras season. Founded in 1872, Rex's colors were originally thought to symbolize royalty — purple being long associated with royalty and gold to represent the crowns.
In 1892, Rex Krewe clarified that purple is for justice, green is for faith and gold is for power.