After trying a few modules, I implemented a similar capability by writing a simple routine that called vim in backticks and had it generate colorized HTML. I use this in the documentation-generation phase of one of my software builds.
It should work perfectly the first time! - toma