This happened to my son's G4 iBook today. I found this thread helpful.
We couldn't get it to stop flashing colors, so we removed the battery, unplugged it, and left it off for an hour while we read what to do. I wasn't hopeful when I saw it could be the graphics card or logic board.
Anyway, we restarted without the battery, and reset pram (see above: reboot holding down apple/option/p/r until you hear the startup sound again.)
Everything works perfectly now! Even with the battery back in. Thanks!