When a Chao reaches the end of its life cycle — the second transformation — a bubble appears over its head. Grey means death, pink means rebirth. Which one you get is largely down to how well you treated it, so consistent care is the real answer.
If it is close to the end, around age five, there is a way to hedge your bets: save, exit the Chao Garden, then wait for the bubble to form. If it turns out grey, reset the console before the game saves and try again.