In the beginning of the movie Donkey knows that Shrek is green, but later in the movie when he's looking for the blue flowers with red thorns he said he was color blind. If he's color blind how does he know shrek is green?
A person who is color blind doesn't necessarily see everything in black and white. They often just cannot tell the difference between two different colors. For example many people cannot tell the difference between blue and green, they see the other colors just fine.