Galaxy S4 Weirdness

Every once in a while, my S4's screen keeps on fading into this rainbow-like pattern, and then it dissapears, I happened to get a snapcapture while it was happening

I put the screenshot on imgur

http://imgur.com/3ZuzZ8k

Hello there fellow s4 user!

Have you installed a custom rom?

What you are seeing is I think a nexus-pattern which is (I think) something taken from the AOSP rom, and is activated when it goes asleep (like a crt-off on nexus, but the animation got replaced)

I have not hacked it in any way, shape or, form

Well it definetly looks software related instead of hardware related to me. You should try a factory reset, but I think the real solution would be to flash new software with odin.

An official software. This will not root the phone and void your warranty.

Also, when does this happen? Just randomly, or when the device goes to sleep? does it happen while it sleeps?

i have a friend who had the same problem with his s2. it happened when he pushed a little harder on the phone or tried to bend it. it looked really funny. it must be hardware related i think. i'd suggest you to use the phones warranty :)

edit: if you were able to take a snapcapture, something's definitely wrong with the software..