By checking the photo-receptors in their retinas. If they have things that function like cones in people, then their retinas have the ability to differentiate colors. They can examine these organs and see what happens when certain wavelengths of light (colors) hit them – a response is a pretty clear sign that colors can be distinguished. It’s possible (but unlikely) that an organ can receive and send signals that cannot be interpreted by the brain, so for at least higher-order animals additional testing on subjects can help reveal if actual color differentiation occurs.
Latest Answers