Ok so chameleons are REALLY weird - if you zoom in on their skin, they don’t actually have any color, instead they have a grid of little reflector cells, spaced ~500 nm apart, like this:
When light comes in that has the same wavelength as that spacing (in this case blue light, with a wavelength of 500 nm), it bounces off these reflector cells at exactly the right distance to line up with all the other blue light coming in. This line-up is called constructive interference, and it means that we see this blue light very intensely!
All the other colors, however, with different wavelengths, don’t line up nicely and just end up mucking each other up (this is destructive interference), and so we don’t see these colors bouncing off the chameleon at all.
Because the chameleon is bouncing back blue light intensely and nothing else, it looks blue to us, even though it really isn’t.
But then the thing that blows my mind: When a chameleon wants to change color, it just... stretches its skin out? Kind of like flexing a muscle? And that changes the spacing of those little reflector cells, to maybe 700 nm apart. At this new distance, the blue light doesn’t line up nicely any more and gets mucked up, but red light (wavelength 700 nm) lines up perfectly, and suddenly the chameleons looks red to us.
Like??? Imagine you’re angry at someone so you flex all your muscles as hard as you can and turn a WHOLE NEW COLOR in the process. What the FUCK!!
Anyway blue eyes in humans work the same way, you don’t have any blue pigment in there, there are just reflectors spaced apart to reflect blue light!