I think all we do is just set newColor = 255, but still push it to the colorStack.

My second point was that newColor is a color_t type, which normally represents a colour.  However, newColor is actually just an index, so should just be an unsigned int instead.  That way if later on we define color_t to be something else (e.g. unsigned char[4]) we don't mess this index up.