How do those colour-changing glass marijuana pipes work?

How do they change colour? Is it some kind of chemical reaction with the smoke or does heat make the glass change colour?