Can you change a vertex color in overlapped area?

Hello everyone!

I was wondering is it possible to change color of particular a vertices in overlapped area.

object A hits object B, and the area it overlapped during the hit, changed the vertex color on object B, for instance from blue to red.

Is it possible to implement something like this?