Originally it was developed by Onmyodo (way of Yin and Yang; an occult divination system based on the Taoist theory of the five elements) and temples and introduced into the Shinto religion.
元々は陰陽道や寺院で作られたものが神道にも導入されたものである。