When iodine and cornstarch are mixed together, they do not turn purple. Instead, the mixture turns a dark blue or black color. This color change is due to the formation of a complex between iodine and amylose, a type of starch molecule found in cornstarch. The iodine molecules fit into the helical structure of the amylose molecules, forming a complex that absorbs blue light and reflects red light. This is why the mixture appears blue or black.
The reaction between iodine and cornstarch can be used as a simple test for the presence of starch. If a few drops of iodine solution are added to a solution containing starch, the solution will turn blue or black. This test is often used in cooking to test whether a food contains starch.