The legislation aims to prevent food companies from using dyes and other additives shown to cause cancer.