Change color of object when using another object to select

Hello there! I wanna do a color selection in real time.

Lets say i have all this planes, each with different colors, and i want my main object to have the color of the plane that i “select”. something interactive.

I imagine if this is possible using drivers, maybe when an object is on top of the plane the main object change the color.

Is it possible?