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.
Nestle first challenged Cadbury's initial trademark application in 2008. It and other confectioners are now free to use the same Pantone 2865c shade in their own packaging.
Cadbury, which is owned by Mondelez International, has been using the colour for its chocolate bar packaging since 1905.
The British confectionery firm's products include Dairy Milk chocolate, the Roses selection box, and the Creme Egg.
"We are disappointed by this latest decision but it's important to point out that it does not affect our long held right to protect our distinctive colour purple from others seeking to pass off their products as Cadbury chocolate," a Cadbury spokesman told the BBC.
"Our colour purple has been linked with Cadbury for a century and the British public has grown up understanding its link with our chocolate."
Cadbury said it was studying the ruling and weighing up the possibility of an appeal.
Last month, Cadbury lost a legal fight to prevent Kiwi company Whittaker's from trademarking the name of a particular type of chocolate.
Cadbury claimed Whittaker's 'Berry Forest' brand was too similar to its own 'Black Forest' chocolate.
The Intellectual Property Office did not agree and allowed Whittaker's to register the 'Berry Forest' chocolate name as a trademark.