You mean, why can an agent that sees an apple also recognize the color red itself? That's trivial, it's because the red color is a low level pattern, learned by the agent even before the apple pattern. If you look at the weight maps of convolutional neural nets, in the first layer you see lines, in the second layer small shapes, then parts of objects, then whole objects as you go up layer by layer. The red color is probably somewhere in the first layer.