"To 'turn white' is a terrible disgrace, which results in instant expulsion from the school and trial at the Japanese Ministry for Magic." (Pm)
Enchanted colour-changing robes are given to the students of Mahoutokoro Wizarding School when they start, originally in a faint pink colour. The robes increase in size as the student grows and also deepen in colour as he or she learns, turning gold if they achieve top marks in every subject (Pm).
A serious infringement of school rules (one that merits expulsion) or Japanese wizarding law (such as the practice of Dark Magic or breaching the International Statute of Secrecy) causes the robe to turn white (Pm).
The seriousness of "turning white" results both in expulsion from the school and a trial at the Japanese Ministry of Magic (Pm), although if the robe has already changed colour then the evidence is against you.
From the Web
Writing by J K Rowling on Pottermore: Mahoutokoro