According to Dr. Paul Saladin, fruits are brightly coloured and sweet because they want to be eaten to spread the seeds of the plant. Unlike roots stems seeds and leaves that don't. To deter consumption they produce chemicals that have extreme tastes like bitter or spicy (ginger, black pepper, chillis) etc. But lemons are brightly colored, however, they have their own extreme taste. What is actually the function of this?
And, come to think of it, chillis are often also brightly colored. What is the evolutionary function of that too?