Why Do Sand Dollars Turn Your Hands Yellow?

We explored a sandbar today that was home to a lot of live sand dollars. After handling them, my son's fingers were stained yellow, which made me remember that happening to me when I was a kid hunting sand dollars.