Shader When CollisionCheck?

I saw somewhere in a video, can’t quite remember which, a guy used like a white shader so when a ball that collided with an object (Which obviously had a collider too), the object flashed white, i mean it’s interior, as if it were hit by something, it’s just an effect, hopefully you know what i mean by this, if not, tell me and i’ll represent it for you with an animation, well the thing is, how do I go about doing this? Somebody help, THANKS IN ADVANCE!

similar to this?

Yes, something like that but not in Javascript