What am I?

I am black when you buy me red when you use me when I turn white you know itโ€™s time to throw me away.