Well, yeah, but you're being too particular. All perception is in the brain, but the brain is trained by its interaction with the environment. "Lighting" is something we learn about, due to changes in lighting. We're fooled by the illusion because we're interpreting a colour due to its supposed lighting, and our ability to interpret lighting is due to our blue cones learning about the environment.
But yes, it's all in the brain.