In article 26, volume 3 of the Engishiki (an ancient book for codes and procedures on national rites and prayers), it is written that a black horse was dedicated when people prayed for rain and a white horse was dedicated when they prayed for fair weather.
延喜式3巻26条では、雨を願うときには黒毛の馬を、晴れを願うときには白毛馬をそれぞれ献納するという記述がある。