Step 1: Open your document. I am using a 200x100px document with a border already made.
Step 2: Press G or go to your side tool bar and select the Gradient Tool (press and hold down the paintbucket tool if you don’t see the gradient tool.) Select any gradient you’d like or make your own.
Step 3: Apply the gradient to the photo diaginally
Step 4: Create a blank Hue/Saturation adjustment layer. We will come back to this.
Step 5: Open your Animations panel by going to Windows > Animation. If you have CS5 or later, you will need to click the option to make the timeline into Frame by Frame.
Step 6: Make sure your animation is labeled as ‘Forever’ so it continually loops, also make the frames 0.1 seconds to ensure the frames are fast enough. This will make sense later.
Step 7: Back to the Hue/Saturation layer. Adjust your Hue/Saturation layer to make your gradient any color you’d like before we start the actual animation.
Step 8: This is where the tricky stuff happens. Well not so much tricky as much as it’s just hard to explain. Okay, first you want to duplicate the Hue/Saturation layer. You should now have two adjustment layers. Good. Now we’re going to edit them. Go to your Hue/Saturation layer (the second one you just duplicated) and move the Hue slider over about 1/4th of the way over, duplicate that adjustment layer and do the same on the next one, moving it over another 1/4th of the slider. Do this until you have FOUR total Hue/Saturation layers.
Step 9: Hide all the Hue/Saturation layers except the first one (click the eyeball next to the layers to hide them). That is your first frame. Create a new frame by clicking the new frame button. Hide the first Hue/Saturation layer and unhide the second one. On the third frame, unhide the 3rd, hide the first two and so on until the fourth frame. You may now click the play button to see your animation.
Step 10: If you want to add text, MAKE SURE YOU ADD TEXT WHILE YOU ARE ON THE FIRST FRAME OR IT WON’T APPEAR ON ANY OF THE OTHER FRAMES. IF YOU CREATE A TEXT LAYER WITH STYLES AND THE STYLES DON’T APPEAR ON ANY OF THE FRAMES EXCEPT THE FIRST ONE, THEN HIDE THE TEXT LAYER AND UNHIDE IT.
(same goes for any other layer styles)
You may also adjust the frame speed to a faster speed if the color transition is not fast enough or smooth enough.
Step 11: To save this as a .GIF go to File > Save for web and devices and then save it again. You are done!