When I need RGB conversion I wrote my own code for it, pretty much the same as agent's and it worked perfectly.