screen randomly flashing a purple/pinkish color for a second and goes back to normal
It's flashing magenta. The green signal to the screen is cutting out, leaving just the red and blue signal. Red + blue = magenta.
Either the GPU is defective, or the video connector between the laptop and the screen is not fully transmitting the green signal. If you're lucky, it's simply a matter of opening the laptop up and re-seating the connector. Fortunately, the standard screen on the Y50 sucks so there are plenty of videos showing how to disassemble it and disconnect/reconnect the video cable.
https
/www.youtube.com/watch?v=7BqVuCKew1E
You say the problem happened when you upgraded to Windows 10? I'm trying to think of a software issue which could cause the green signal to cut out. But unless the video drivers have a severe bug in them, I can't think of one. Maybe Win10 is driving the screen at a higher refresh rate than Win8, and the problem doesn't show up a lower refresh rates but does at higher refresh rates? If this is the UHD model, then I believe the screen is limited to 48 Hz. Maybe Win10 is trying to drive it faster than that?
The fact that it happens with both video cards doesn't really tell you anything. The Y50 is an Optimus laptop. In these laptops, the Intel card
always drives the screen. When the nvidia card is active, it's used as a co-processor which draws the screen in memory, then passes it to the Intel card which sends it to the screen. So the green signal is cutting out somewhere between the Intel card and the screen, regardless of whether you're using the Intel GPU or nvidia GPU.