The bright color of purple sweet potatoes comes from anthocyanins, which are environmentally unstable and prone to enzymatic browning or heat damage from cooking, resulting in a color transition from purple to yellow brown. This study uses common cultivated purple sweet potato variety 'Tainung No. 73' and our newly cultivated variety 'Taoyuan No. 4' as materials. The experiment tests the effects of different cooking methods (steaming, boiling, and baking) on the total anthocyanins, total polyphenols, and color of purple sweet potato flour. The results indicated that the steaming treatment of 'Tainung No. 73' has the highest total anthocyanin content, total polyphenol content, and color. The steaming and boiling treatment of 'Taoyuan No. 4' has no statistically significant difference in total anthocyanin content, total polyphenol content, and color. It can be processed according to the cooking equipment that is convenient to obtain as the method. The purple sweet potato can replace artificially synthesized pigment, and switched to natural ingredients as coloring materials.