Restore discs, which are usually grey, are generally machine specific and will not install on machines other than the one it was designed for.
You have at least two things going against you here:
1. G4 has a PPC processor
2. The iMac has an Intel processor.
Given that, I would not be surprised if the Restore disc took one look at the G4 and tell you it cannot install on this machine.
I have a G4 Tower, PN 614-0157 running on OS X 10.4
I Would like to install OS X 10.6
I Have a I Mac Model MC508LL/A which has a Mac OS X 10.6.4 Install DVD
Can I use that DVD to Up Grade the G4 to OS X 10.6?
Also can the Applications Install DVD be used?