Do you see the pattern and colours when you first start up the computer too, or just while you are in OSX. If you see it all the time, then it sounds like your iMac could be part of a large number of the G5 iMacs that have fallen prone to graphics card failures. These models are notoriously know for having issues with either their capacitors or their video cards. If the issue lies with you graphics card, then the only way to fix it is to replace the logic board. Some people have had success with doing what they call a re-flow of the graphics card, but I would only suggest this is you feel comfortable with taking your mac apart, and at the same time have nothing else to loose. I had 3 of the original G5 iMacs in my household and they have all fallen to graphics card failures. You can probably find a lightly used logic board on eBay if you are really wanting to salvage this mac, most of these older parts are cheap of you look in the right places.
Hope this Helps
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
2
crwdns2947414:01crwdne2947414:0
1.9 GHz PowerPC 970fx (G5)
Intro Date: October 12, 2005 Disc Date: January 10, 2006
Order No: MA063LL/A Model No: A1144 (EMC 2081)
Subfamily: iSight Model ID: PowerMac12,1
Std RAM: 512 MB Std VRAM: 128 MB
Std Storage: 160 GB (7200 RPM) Std Optical: 8X DL "SuperDrive"
Does this look about right?
crwdns2934271:0crwdnd2934271:0 oldturkey03 crwdne2934271:0