Yep! Actually, this is always how it works. Every living creature that can see is "colorblind"[1] in the sense that it projects the infinite dimensional space of visible light intensity (a histogram of intensity vs wavelength[2]) onto a small finite-dimensional subspace of perceived "color". For us, n=3. For dogs, n=2. For the mantis shrimp, n=16. There's nothing special about 2 or 3 or 16 other than that's how many different types of photoreceptors we have. The fact that we can represent "color" as an RGB triple is purely an artifact of the ways our eyes are built.

Anyway, matching color really involves making sure that the projection of its spectrum on the perception space of its predators is the same as that of its background (there are other camouflage techniques, let's ignore them for the time being.)

Pa=Pb P=projection, a=animal, b=background

P is, as you note, strongly dependent on the predator! What fools humans might not fool birds and dogs (or vice versa) because we have different P due to having different spectral responses in our photoreceptors. Each "row" of P is a photoreceptor sensitivity spectrum.

Why should a programmer care? Funny story, about a year ago there was someone in here who was going on about how his company made bill validators that couldn't be fooled by photocopied money. He was convinced the secret sauce had to do with machine learning. Of course the more likely explanation is that the photocopier (which is acting like the "prey" in our example and matching colors) was designed against the P of a human eye, not the P of whatever photosensor+light combo was used to inspect the incoming currency. The copier was tailor made to fool humans but not to fool silicon photodetectors, which will naturally have quite different spectral response functions (rows of P). If that's all there was to the story (I don't know enough to say definitively one way or another), someone familiar with the way spectra work would know that the printer was quite possibly one matrix multiplication away from working for this alternative purpose. Oops! Or "tee-hee-hee" depending on which side you're on, I suppose.

For a more benign example, imagine creating a physically based effect for a video game or movie. The physics equations all take "inputs" and give "outputs" parametrized on wavelength. But all your art assets and screen colors are in RGB. When translating into the language of physics you're forced to invent information that you don't have (spectral details outside our perception space) and when you're translating out of the language of physics you're forced to discard this information. The latter is fine, but the former? If you're not aware that you are making an arbitrary decision (i.e. if you just plug in our sensitivity spectra or ink spectra or delegate to a library that does so), you might find yourself unable to match nature, and it might take you a long time to find the knob you need to tweak in order to get correct behavior.

[1] By "see" I mean "resolve an image". I'd be willing to bet that there's a creature out there that uses chromatic aberration or continuous variability in the activation spectra of its light sensitive neurons to its advantage. But I'd also be willing to bet that it doesn't independently resolve a full spectrum for each angle of incoming light.

[2] and direction of travel and location in space and polarization and probably a few more I'm forgetting.