Well if CPU usage is a problem, what about a javascript solution? That would take care of the problem of CPU usage. Add in a button to "colorify" the code on the current page and it might work well.
Want to support the EFF and FSF by buying cool stuff? Click here.