Inside your retina sit two kinds of light-sensitive cells: rods and cones. Rods are for low light and don’t see color - they’re what you use to see in a dim hallway. Cones are for color and bright light. You have about 120 million rods per eye and only 6 million cones, but the cones are clustered in the very center of your retina where vision is sharpest.
What’s amazing is that color vision only uses three kinds of cones: ones that respond most to red light, ones that respond most to green light, and ones that respond most to blue light. Every color you can see - from yellow to magenta to teal to gold - is just a combination of how strongly each cone type is firing. Your brain mixes the three signals into the experience of color.
Other animals have wildly different setups. Dogs have only two cone types, so they see fewer colors. Mantis shrimp have at least twelve types of color receptors - but research suggests they use them to identify colors quickly, not to see more shades than we do. Birds and bees see ultraviolet light - meaning flowers have hidden patterns we can’t see.