Before the twentieth century, Ireland's leprechaun usually dressed in red, not green
The green-clad leprechaun guarding gold is a late invention. Older Irish accounts gave him a red coat laced with gold and a cocked hat. His earliest appearance, in an eighth-century saga, has three tiny water sprites dragging a sleeping king of Ulster into the sea and buying their freedom with wishes.
Irish folklore pictures the leprechaun as a small bearded man in coat and hat, fond of mischief, often busy with shoes and sitting on hidden treasure. Creatures of this kind are rare in the older mythology and only came to the fore in later folk tradition. The English word descends from Old Irish forms such as luchorpán, and spellings have wandered widely, from lubrican to leprehaun. It entered English print in 1604 in Dekker's play The Honest Whore, Part 2.
Where the name comes from is disputed. Whitley Stokes proposed roots meaning small body. A 2019 study linked it instead to the Luperci and the Roman festival of Lupercalia. Popular etymology reads it as half a brogue, because the creature is so often shown mending a single shoe.
The oldest story is the Echtra Fergus mac Léti, surviving in two very different versions, one dated to the eighth century and later retold as a thirteenth-century burlesque. Fergus, King of Ulster, wakes on a beach being hauled into the water by three lúchorpáin, seizes them, and is granted three wishes for letting them go. D. R. McAnally, writing in 1888, said the creature mended its own shoes constantly because it ran about so much, which gave a human the chance to grab it and demand riches.
William Butler Yeats, part of the late nineteenth-century literary revival that popularised the figure, labelled it a solitary fairy. Solitary fairies, he said, wore red jackets while trooping fairies wore green, and his leprechaun had seven rows of seven buttons. The folklorist Diarmuid Ó Giolláin thinks the fairy label is mostly popular habit and finds closer parallels in Teutonic dwarfs and household spirits. Unlike the Aos Sí of the fairy mounds, who might steal children, the leprechaun stops at pranks.
Source: Leprechaun