They are certified to contain no more than the amount of lead, mercury, arsenic, benzidine, and other contaminants that the Food & Drug Administration (FDA) considers acceptable. They are certified to contain a minimum percent of actual color as specified in the Code of Federal Regulations
The manufacturer must submit a sample of each batch of dye to the FDA for certification. In 2009, almost 20 million pounds of coloring were certified.
Consider benzidine. Yellow #5 & Yellow #6 are each allowed to have 1 ppb (parts per billion) of benzidine. That is a really tiny amount; benzidine is known to cause cancer, but it apparently can't be easily removed from the dye, so the FDA decided to allow it at that amount. But how much is really in there?
Drs. Peiperl and Prival wanted to see how much benzidine is actually in the Yellow #5 and #6 you buy in the supermarket, so they bought bottles and tested them. In 1993, they found that half of the 53 Yellow #5 samples they tested contained 7 to 83 ppb of benzidine, and in 1995, they found that half the 67 samples of Yellow #6 contained more than 10 ppb benzidine, with some as high as 104 ppb, and one at 941 ppb. Separately, Dr. Lancaster, in Canada, did a similar study in 1999, reporting that he was finding levels of benzidine ranging from less than 5 to 270 ppb.
Consider lead. That is a big subject, well covered by the Mayo Clinic's website on lead poisoning, and the FDA tells us to avoid it because it damages the brain of both children and adults. Yet it is an interesting bit of trivia that while the synthetic food colorings are allowed to have no more than 10 ppm (parts per million) of lead, many of the "D&C" colors used in medications and given multiple times a day to sick people are allowed to have double that amount.