Swiss food giant Nestle has successfully challenged Cadbury's attempt to trademark a distinctive shade of purple used in its packaging.
Cadbury won a legal case last year which meant other chocolate firms could no longer use the colour, which is known as Pantone 2865c.
Nestle, the world's biggest food company, appealed that decision and has now had it overturned in the UK Court of Appeal.
In his ruling, Justice John Mummery said Cadbury's formulation did not comply with the requirements for trademark registration.
The trademark application lacked "the required clarity, precision, self-containment, durability and objectivity to qualify for registration" Judge Mummery said.