Altitude is an important ecological factor affecting plant physiology and ecology, material metabolism and gene expression. Tuber color changes were observed in purple and red potatoes growing at four different elevations ranging from 1,800 ± 50 to 3,300 ± 50 m in the Tiger Leaping Gorge area of Yunnan Province. The results showed that the total phenol content, total flavone content, total anthocyanin content and biological yield of anthocyanin increased with increasing altitude until 2,800 ± 50 m, and the highest anthocyanin content were detected in the purple potato Huaxinyangyu and the red potato Jianchuanhong at the flowering stage and budding stage, respectively. Combined transcriptomic and metabolomic analyses revealed that the content and diversity of flavonoids are associated with genes expression via the promotion of propane metabolism to improve potato adaptation to different altitudes. These results provide a foundation for understanding the coloring mechanism and creating new potato germplasms with high resistance and good quality via genetic manipulation.