It looks like a graphic card problem.
Old iMacs have got the graphic card soldered into the logic board so, if you are lucky and you find a place where you can get the logic board for your old iMac replaced (I doubt it, as it's a PowerPC-based Mac), it will be very expensive. If you don't mind, you should get a new PC or Mac instead of repairing this iMac
You may have a problem with the video chip.
Here is how to tell...
Shutdown your machine. Hold down the shift key. Poweron. Bootup will be longer.
Wait awhile while you harddrive is being checked.
An article on how to boot into safe mode.
Runs OK in safe mode...
Running in Safe mode leaves out some video drivers. Which results in your machine not using advanced video hardware. As luck would have it, you can run the safe mode video drivers in normal mode.
Here is how:
Look through the above thread. See the second page. You don't have to read through the first page. Just go to the part where I try a solution that works.
Summary of G5 problems. Includes instructions on a hardware fix for the brave at heart:
See -Rotten Apple- articles in both of these threads.