In Germany at least it's not copyright but a thing called "taste patent". As far as I know it can cover colors, shapes and probably literal taste as well. But it's not automatic like copyright. It's more similar to trademarks.
For example Cadbury has a trademark protecting its purple (defined as pantone 2685C) from competitors in the chocolate industry. On the other hand Whiskas has one protecting its purple (defined as CMYK {40% C, 100% M) from competitors in the cat food industry.
Because its trademark law both only cover their specific industries (so purple would be fair game for a business in another field), but despite the precise definitions used for the colours they would be able to argue that a competitor using a similar purple could cause confusion in consumers, (so they effectively block out an area of the color spectrum).
I.e. Deutsche Telekom tried to stop other companies from using magenta. However, the court ruled that DT can't hold a patent on magenta as a whole, only their specific hue.
Ritter Sport is a sweets' manufacturer famous for their square chocolate bars.