Red was also featured in Chinese Imperial architecture. In the Tang and Song Dynasties, gates of palaces were usually painted red, and nobles often painted their entire mansion red. One of the most famous works of Chinese literature, A Dream of Red Mansions by Cao Xueqin (1715–1763), was about the lives of noble women who passed their lives out of public sight within the walls of such mansions. In later dynasties red was reserved for the walls of temples and imperial residences. When the Manchu rulers of the Qing Dynasty conquered the Ming and took over the Forbidden City and Imperial Palace in Beijing, all the walls, gates, beams and pillars were painted in red and gold.