Attorney General Kamala Harris' office filed the lawsuit on Tuesday in San Francisco Superior Court.
The suit claims the retailers and candy makers "knowingly and intentionally" exposed consumers to lead in violation of Proposition 65, which requires businesses to issue warnings about even minute amounts of chemicals deemed harmful by the state. The suit says laboratory tests verified lead in the products.
If found true, the candy makers and retailers could be fined up to $2,500 per day for each violation.
Whole Foods Market California Inc. and Trader Joe's Co. did not immediately return calls for comment.
MORE HBJ HEADLINES
Target faces backlash on stance on transgender bathrooms 1:05 p.m. Driver in fatal duck boat crash in Boston cited 10 times for speeding 10:19 a.m. St. Louis jury awards $55M in Johnson & Johnson cancer suit 10:16 a.m. Corporate earnings keep falling, but there are signs of life 1:06 p.m. Rich newspaper owners: Industry savior or foe? 1:00 p.m. U.S. ends Ford pickup probe without seeking recall 1:03 p.m.