Sir James George Frazer (1854–1941).  The Golden Bough.  1922.

§ 2. Not to see the Sun
THE SECOND rule to be here noted is that the sun may not shine upon the divine person. This rule was observed both by the Mikado and by the pontiff of the Zapotecs. The latter “was looked upon as a god whom the earth was not worthy to hold, nor the sun to shine upon.” The Japanese would not allow that the Mikado should expose his sacred person to the open air, and the sun was not thought worthy to shine on his head. The Indians of Granada, in South America, “kept those who were to be rulers or commanders, whether men or women, locked up for several years when they were children, some of them seven years, and this so close that they were not to see the sun, for if they should happen to see it they forfeited their lordship, eating certain sorts of food appointed; and those who were their keepers at certain times went into their retreat or prison and scourged them severely.” Thus, for example, the heir to the throne of Bogota, who was not the son but the sister’s son of the king, had to undergo a rigorous training from his infancy; he lived in complete retirement in a temple, where he might not see the sun nor eat salt nor converse with a woman; he was surrounded by guards who observed his conduct and noted all his actions; if he broke a single one of the rules laid down for him, he was deemed infamous and forfeited all his rights to the throne. So, too, the heir to the kingdom of Sogamoso, before succeeding to the crown, had to fast for seven years in the temple, being shut up in the dark and not allowed to see the sun or light. The prince who was to become Inca of Peru had to fast for a month without seeing light.   1