A woman in Japan has won compensation after teachers repeatedly pressurised her to dye her hair black, causing her to drop out of school.
The school did not believe her natural hair colour was brown and told her to dye it black.
It banned her from attending some classes and school trips because "her hair was not dyed black enough".
A court ruled the school's actions were legal but the ex-student should get 330,000 yen ($3,100) in damages.
The court in Osaka ruled that the prefectural government caused emotional damage to the former student, now 21, by pressing her to dye her hair.
Schools rules prohibit pupils from "getting their hair permed, coloured, bleached or braided with extensions," according to the legal case reported in Japanese media.
In court the defence said that a vice principal checked the teenager's roots in a "surveying session" and believed it was black, not brown as she claimed.
In order to maintain the rules against hair dyeing, the school told the student to dye her hair black.
She was prevented from joining a school trip, her seat in a classroom was removed and her name was erased from a class list because "her hair was not dyed black enough", the lawsuit added.
The court sided with the school, agreeing that the rules were legitimate in order to encourage students to focus on their studies.
But it said the actions left the student depressed and that the school "did not consider the psychological toll" on her.
Many schools in Japan strictly control pupils' appearances, even going so far as to dictate the colour of underwear.