I'm not sure about that. If Mary knows all the physics of light, she can design and set up a sensor to detect the color of the apple and the instructions, just like we have sensors that detect ultraviolet and infrared light. Just as we will never know how it feels to "see" ultraviolet light, this thought experiment is about Mary's subjective experience perceiving color, not her ability to determine the color of the world around her.