The California Legislature has passed a bill with bipartisan support banning the use of red dye No. 40 and five other chemicals in foods served at public schools.