Since RGBA is just messing around with numbers it will work on G1 and G2. You might have to define the constants, but I doubt that because there is a ported version of Ikarus for G1 which should include these constants. Just the Address for the Hook is the wrong one.
You should really try to understand what the hooks are doing before you use them because you seem pretty... uninformed, not to say you suck at programming (okay, that's actually not true, but you have a lot to learn and understand instead of just using things I or others show).
I don't see why Avallach is getting insulted at all, he comes up with a more decent knowledge of programing than you do, that's at least my perception...
I nearly never test my scripts I post if someone has a problem (at least if I don't say so) because I want them to understand so they can do it by themselves (The script is more like a hint than a solution). Of course I post working scripts if I have them on my HDD or somewhere in the forums but otherwise I'm mostly doing them from scratch in the browser since it's easy stuff most of the time.