During the Song dynasty (906–1279), officials of the top three ranks wore purple clothes; those of the fourth and fifth wore bright red; those of the sixth and seventh wore green; and the eighth and ninth wore blue