ive heard that some chams are capable of learning colors or patterns. i have also heard otherwise. i figured this is the best place to get the truth about this matter.
Well since most use colors and/or patterns for mating and territorial displays, I think it's safe to say they can recognize colors and patterns.
As for learning there is antidotal evidence that they can learn to associate the color/shape of a item with it's contents (such as a chameleon that had been fed using red dixie cups as feeders, later shooting at the cup in someones hand even tho there was no insects in it and the person who now owned the chameleon didn't use feeder cups)
but to my knowledge there is no scientific proof to back this up.