Color-changing glass - how does it work?

Why does color-changing glass, commonly used in smoking accessories, change color? I’ve noticed that it seems to change color as the inner surface gets dirty, and will change back if cleaned. What gives?

Is the only place they use color-changing glass in bongs and pipes, or what? :confused: 'Cause that’s all Google’s giving me.

Anyway, found this.