Iodine test on food is used to test for the presence of carbohydrates.
Carbohydrates are a type of macronutrient found in foods like bread, rice, and pasta. Iodine, when mixed with starch (a type of carbohydrate), reacts by turning from brown to blue-black in color. This is because iodine molecules slip into the coils of starch molecules, forming a complex that reflects light differently and appears blue-black to the human eye.
Proteins, fats, and vitamins do not react with iodine in the same way as carbohydrates, and therefore the iodine test is not used to test for their presence.
For example, fats do not contain the type of chemical bonds that iodine can react with, so there is no color change when iodine is added to a sample of fat. Similarly, vitamins do not react with iodine in a way that produces a color change.
In summary, the iodine test is used specifically to test for carbohydrates in food by looking for a color change from brown to blue-black.