No, pain is a data structure in the brain.
I'm sorry, but "data" is (a) an abstraction, and (b) something which requires an observer and an observed. If all humans were wiped out this afternoon, there would no longer be any "data" in the world.
The brain is a physical object, so let's please discuss it in those terms.
In any case, the point is that when you're talking about stuff that exists out there in the world, whether it's a needle or a beam of light, it makes absolutely no sense to say that somehow a brain's response to contact with that thing is a quality of the thing.
Pain is (sometimes, not always) an animal's nervous system's response to contact with a needle.
Color is (sometimes, not always) an animal's nervous system's response to contact with light.
There's no significant difference between the two in that regard.
Also, we've seen that different brains produce different colors in response to the exact same type of light. Therefore, it is impossible for anyone to actually identify
which color we should claim to be a property of which wavelength.
Color is not a property of light QED.
Color is not "out there" in the world to be perceived or registered. It is produced entirely by the brain.
And currently, no theory exists to explain the
observable fact that our brains respond to various types of light with various colors, rather than some other phenomenological response, or none at all.
There is no theory to explain why light from the sky doesn't result in the brain producing red, or the scent of lemons, or the sound of static.
And you can't say, "Well, that's easy, our brains don't produce the scent of lemons because that's olfactory", because we don't know
why that is the olfactory response because there is no "scent of lemons" in the lemons, just as there's no pain in the needle and no color in the light.