Solar energy has long been one of the great hopes for fighting climate change and liberating the world from fossil fuels. And it’s easy to see why solar has captured the collective imagination: All those photovoltaic panels look so shiny, futuristic, clean, and green.

That’s not quite the case. Any form of energy production has its dirty side and solar is no exception. While its impact is nowhere near that of coal-fired power plants, photovoltaic modules are made from a witch’s brew of toxic chemicals. Arsenic, cadmium telluride, hexafluoroethane, lead, and polyvinyl fluoride are just some of the chemicals used to manufacture various types of solar cells.

None of this poses much, if any, threat during a solar panel’s working life. Solar modules—which are linked together to form a solar panel—for instance, are solid state and encased in glass or other protective material to keep them dry. The problem, as the Silicon Valley Toxics Coalition pointed out in a 2009 report, comes at the beginning and end of a panel’s life. Toxins potentially can be released during the manufacturing process—putting workers at risk—and when panels finally hit the scrap heap decades later.

“The solar PV industry has the potential to provide enormous environmental benefits,” according to the Silicon Valley Toxics report, “but the toxic materials contained in solar panels will present a serious danger to public health and the environment if they are not disposed of properly when they reach the end of their useful lives.”

The report compared the nascent but fast-growing solar industry to the electronics industry of past decades, which left a legacy of toxic pollution in the 1970s and ‘80s. Unlike the early electronics industry—which in Silicon Valley was literally built on plumes of contaminated groundwater—solar companies are taking a more responsible approach, as any green business must.